6

Show HN: Emacs Configuration Generator

 2 years ago
source link: https://emacs.amodernist.com/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Emacs Configuration Generatoremacs.gif

Emacs Configuration Generator

Some people claim that Emacs is difficult to start with. The main problem is probably the chicken-and-egg situation: To make the most use of Emacs, you probably need to understand Emacs (Lisp), but to grok Emacs Lisp you pretty much neeed to understand the fundamentals of Emacs.

A common suggestion is to use frameworks or ready-made configurations that provide a layer of abstraction to help set up common functionality. This site is an attempt to approach the issue from a different standpoint, by having an interested user pick-and-choose what they would like to start with and provide a template to build on. Note that you will be suggested a few packages that are downloaded over the internet, from the ELPA (Emacs Lisp package archive) repositories.

Note: This site is still experimental, and there is a lot more that can be done. See this article for more details.

So if interested, fill out the form below and have a configuration file generated.


General

Some options might depend on the version of Emacs you have installed. If you know what version you will be using, set it here. Otherwise it will be assumed that you have Emacs 27.1 installed (currently most widely available version).

What Emacs version do you have installed:

Appearance

You might use a custom theme for aesthetic reasons or because you have a visual impairment. Here follows a list of themes that are bundled with Emacs, that you might be interested in.

  • Defaultdefault.svg
  • Adwaitaadwaita.svg
  • Deeper Bluedeeper-blue.svg
  • Dichromacydichromacy.svg
  • Leuvenleuven.svg
  • Leuven Darkleuven-dark.svg
  • Light Bluelight-blue.svg
  • Manoj Darkmanoj-dark.svg
  • Misteriosomisterioso.svg
  • Modus Operandimodus-operandi.svg
  • Modus Vivendimodus-vivendi.svg
  • Tangotango.svg
  • Tango Darktango-dark.svg
  • Tsdh Darktsdh-dark.svg
  • Tsdh Lighttsdh-light.svg
  • Wheatgrasswheatgrass.svg
  • Whiteboardwhiteboard.svg
  • Wombatwombat.svg
What Font do you want to use by default?:

By default Emacs has a few GUI elements enabled. Some prefer to disable these, as they do everything using the keyboard. Beginners should think twice about doing this, as the GUI (especially the menu bar) provide useful pointers.

Disable menu bar?
Disable tool bar?
Disable scroll bars?

By default Emacs comes with a splash screen, including a list of useful pointers. If you are sure you don't need it anymore, it can be disabled.

Disable splash screen?

User Interface

Package vertico

Completion framework

Emacs default completion behaves similar to Bash, in that it first attempts to expand a string up until an unambiguous point, then pops up a list of possible completions. A popular alternative to this expandingapproach is interactive narrowing, that is to say the list of candidates (files, buffers, etc.) are immediately presented and the user restricts these until they have found what they are looking for.

If interested, you can add Vertico a popular package that implements this kind of interaction.

Add this package?

Enabled by default
Display completions horizontally (which saves space), instead of vertically (which might be easier to read)?
Improve directory navigation?

Package consult

Extended completion utilities

If you decide to use Vertico, Consult might also be of interest. It defines a number of convenient commands that make use of narrowing completion.

Add this package?

Use for switching buffers
Add command to search all lines in a buffer.
Add command to jump to definitions.

Ignore case when completing?

If you prefer to see the line numbers at a quick glance, you might be interested want to enable line numbering. It is disabled by default, because you don't really need it most of the time. Also note that you might not want to have it enabled everywhere, as often the content of a text buffer isn't just a text file you might address line by line, but documentation or interactive applications such as a shell/REPL. It is therefore perhaps better to only enable line numbering when interacting with program code.

Enable inline line numbering?

No, keep it disabled
Yes, but only in programming modes
Yes, enable it everywhere

Do you want Emacs to automatically add the closing parentheses, when you insert the opening ones? This would also apply to brackets of all sorts, quotes and in some cases additional constructs depending on the programming language. Note that if you are used to typing out the closing parenthesis, this shouldn't be an issue, as Emacs will just move over it if it were to be inserted.

Automatically pair parentheses?

Programming

Most people use Emacs for programming. This section has a few popular programming languages and tools you might be interested in.

Programming-language agnostic tools

Package eglot

LSP Support

The Language Server Protocol has become a popular method to provide language introspection (error checking, completion, ...) independently of an editor. To make use of this in Emacs, a package has to be installed.

Note that this still requires an LSP Server to be provided, for whatever language you intend to use.

Add this package?

Enabled by default when programming?

Built-In Package flymake

Inline static analysis

To indicates static analysis messages on the fly, use this.

Note that this package is built-in but can be updated to add new features.

Add this package?

Enabled by default when programming?
Display messages without prompting?
Bind commands to navigate messages?

Package company

Pop-up auto-completion

Enable this if you like unprompted completion to be displayed in a little popup dialogue, while typing.

Do not confuse this with a completion framework. They are used for querying the user for information, this completes text in a buffer.

Add this package?

Enabled by default when programming?

Version control

Package magit

Git client

The well known Git client Magit is one of the most popular packages, and is said to make using Git easier.

Add this package?

Bind to a convenient key?
Show word-granularity differences within diff hunks?

Package diff-hl

Indication of local VCS changes

If you wish to see at a quick glance what section of a file have been added, modified or removed, you might be interested in highlighting these changes next to the content of the buffer.

Add this package?

Enabled by default when programming?
Update the highlighting without saving?

Programming languages and Programming-adjacent languages

While Emacs has support for a number of languages out of the box (C, C++, Python, Perl, Lisp, Fortran, XML, HTML, Pascal, Ruby, TCL, TeX, ...), some can make use of some additional configuring, while others need external packages.

Package ada-mode

Ada Support

Add this package?
Package clojure-mode

Clojure Support

Add this package?
Package csharp-mode

C# Support

Add this package?
Package d-mode

D Support

Add this package?
Package elixir-mode

Elixir Support

Add this package?
Package go-mode

Go Support

Add this package?
Package haskell-mode

Haskell Support

Add this package?
Package j-mode

J Support

Add this package?
Package json-mode

JSON Support

Add this package?
Package julia-mode

Julia Support

Add this package?
Package kotlin-mode

Kotlin Support

Add this package?
Package lua-mode

Lua Support

Add this package?
Package nasm-mode

NASM Support

Add this package?
Package php-mode

PHP Support

Add this package?
Package raku-mode

Raku Support

Add this package?
Package rust-mode

Rust Support

Add this package?
Package scala-mode

Scala Support

Add this package?
Package sml-mode

Standard ML Support

Add this package?
Package swift-mode

Swift Support

Add this package?
Package typescript-mode

Typescript Support

Add this package?
Package yaml-mode

YAML Support

Add this package?

Writing

LaTeX

Package auctex

LaTeX support

Via AucTeX, Emacs has good support for working with LaTeX, including help when inserting macros, quick math-mode input, automated building and viewing of documents and inline preview.

Add this package?

Enabled LaTeX math support?
Enabled reference managment?

Markdown

Package markdown-mode

Markdown support

The Markdown markup language is commonly used for documentation. If you use it, adding this package might be convenient.

Add this package?

Org Mode

Built-In Package org

Outline-based notes management and organizer

The well known markup format for Emacs, Org Mode can be used for anything from managing apartments, writing manuals, literate programs or executing code like a programming notebook.

While Org Mode is bundled in by default, you can decide to fetch a new newer version that what is provided by default by your Emacs installation.

Add this package?

Add binding to store links?
Add binding to view your agenda?

Package org-contrib

Additional Org-mode related functionality

If interested in Org Mode, you might also like these extensions that are not distributed with Org by default.

Add this package?

Utilities

Applications

Package crdt

Collaborative Editing

If you have friends using Emacs, this package might be of use if you need to work on the same files at the same time, so that everyone can see what everyone else is doing. The package uses Conflict-free replicated data types to synchronise the buffer state, without the need for a central server or service.

Add this package?
Built-In Package rcirc

IRC Client

IRC remains popular, especially among Emacs users. If you want to hang out in a chat room or need to contact a project you are having issues with, having a basic IRC configuration can be of use.

Add this package?
What IRC nick do you want to use?:

Indicate channel activity in the mode line?
Hide less important messages like users joining or leaving?

Text manipulation and navigation

Since everything is just a text buffer in Emacs, general purpose utilities and commands have wide applicability. This section suggests a few popular examples.

Package avy

Jump to arbitrary positions

This package provides functionality to jump to to any position (and manipulate it) using very few keystrokes. For this, you look at the position where you want point to be, invoke Avy, and then enter the sequence of characters displayed at that position.

Add this package?

Add a binding to jump to a word?
Jump to any open window?

Editor emulation

Emacs is programmable and the default behaviour can be modified, improved or disabled. As such it follows that it is possible to emulate the behaviour and user experience of other editors.

An example: CUA (Common User Access) are the conventions popularised by IBM in the 1980's, that are used by most other programmes. Think of copying using C-c, pasting using C-z.

Emacs not only predates these conventions, but stands in conflict with the bindings by default. An attempt at resolving this can be done usingcua-mode. If you find yourself struggling with Emacs bindings, enabling this might help overcome your initial difficulties.

Enable CUA key bindings?
Package evil

Vim Emulation

The child of the beast, Vim, another popular editor is often mistakenly used instead of Emacs. Some have sadly gotten used to the sinful ways, and prefer the modal approach to Emacs default bindings. If you too are affected by this curse, this package might help.

Add this package?
Package brief

Brief Emulation

An editor more popular during the time of MS DOS, can also be emulated by Emacs.

Add this package?

Miscellaneous

Finally a few useful options, tricks and hacks that are suggested.

Guess the major mode from the file name?
Require a confirmation before closing Emacs?
Resize frame and window pixel-wise (instead of character-wise)?
Remember the last position in a file?
Remember previous user input (file selection, etc.)?
Remember what files were last opened?


Further links

If you have no previous experience with Emacs, take your time to try out to built-in tutorial (C-h t). To view the documentation for a package use C-h P. Here are a few more relevant links, that might be of use

Also consider joining the #emacs channel on Libera Chat.

ECG was made by Philip, is developed on Sourcehut and is distributed under AGPL 3.0.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK