Configuration for GNU Emacs

Stefano Mazzucco cc310a55ce Use Emacs 30 on Linux (macport is not yet available) 2 settimane fa
init.d 86ab646dc8 Refactor python config 5 mesi fa
vendor 5b3cfa6448 Remove nix-company.el as it's broken 2 anni fa
.envrc f6289a2af3 [BREAKING] Add nix support 3 anni fa
.gitignore f6289a2af3 [BREAKING] Add nix support 3 anni fa
Makefile 818d4f408b Remove 'result' on 'make clean' 2 anni fa
NEWS 0a7ad15f0f NEWS: migrating to notabug.org 10 anni fa
README.md 0c9374911b Actually fix markdown in README 2 anni fa
VERSION cc310a55ce Use Emacs 30 on Linux (macport is not yet available) 2 settimane fa
default.el f56dfcd003 Use solarized-wombat-dark theme 1 anno fa
default.nix cc310a55ce Use Emacs 30 on Linux (macport is not yet available) 2 settimane fa
flake.lock d07a8018f9 NixOS: 24.05 -> 24.11 2 settimane fa
flake.nix d07a8018f9 NixOS: 24.05 -> 24.11 2 settimane fa
init_bash.sh 646690a09d Simple PS1 for bash and zsh shells inside Emacs 9 anni fa
init_zsh.sh ba7b8e3dfb Remove bold and underline from zsh prompt 7 anni fa
remove_elc.sh b79940b6e0 Add utility script to remove elc files 7 anni fa

README.md

My GNU Emacs Configuration

This is my GNU Emacs configuration, it is unlikely that anyone else will be using it. If you are looking for a comprehensive configuration to get you started you can look at larger projects like Spacemacs.

This configuration supports a bunch of editing modes that I need for work or pleasure. Not all modes are equally supported as I may be switching back and forth. These editing modes are grouped in "user modules".

The configuration employs the great use-package package to optimize load time.

There are a bunch of custom key bindings mostly in specific mode maps, for example I try to always map commands that show the documentation to M-?. At the moment the key bindings are not documented, but they can be easily found by running M-x describe-bindings (usually mapped to C-h b).

Supported GNU Emacs Version

This configuration is known to work with Emacs 27.2.

Installation

This project should be installed using the nix package manager. The experimental flake feature is also supported.

Using nix stable

After checking out this project, you can build the nix derivation with nix-build.

nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'

The derivation lets you build different flavours of Emacs based on the extraConfigs argument. For example:

nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { extraConfigs=["clojure"]; }'

For example, you could create a nix overlay to install Emacs in your profile.

Using the experimental flake feature (nix unstable)

This project leverages the experimental nix flake feature.

Including into another flake

You can declare this flake as input to another flake and include its packages, overlays, etc.

{
    description = "Some flake that uses my Emacs";
    inputs.my-emacs.url = "path to this project";

    outputs = { self, nixpkgs, my-emacs}: {
        # use the my-emacs flake here
    };
}

Building

You can use the experimental nix build.

# build the default emacs
nix build

# add the Python configuration
nix build '#.python-ide'

# add the Lua configuration
nix build '#.lua-ide'

# build everything
nix build '#.full'

Running

You can also directly run the Emacs configuration using nix run rather than nix build.

Further Configuration

You can use the usual Emacs init file for further configuration.

Customizations made with customize, are saved in a file called private.el. It's a good idea to keep private.el versioned in an external repository and symlink it to ~/.emacs.d.

A Note On Versioning

This configuration is loosely versioned. I try to tag whenever things seem stable enough.