This is my current emacs configuration - it's a simple system that supports multiple "installations" from different machines.
projectilehelmdracula-themepareditmagittreemacscompany-modegptel(LLM integration)inkling(Intelligent code suggestions with LLMs)
- Copy the example init file:
$ cp init.example.el init.el-
Copy an existing file in the
installationsdirectory and tweak it. -
Load that installation from the
init.elfile.
(load "~/.emacs.d/installations/your-installation.el")The way it works is that modules.el defines a bunch of macros for
different bits of functionality (e.g. clojure-mode and key bindings)
without explicitly executing them.
Then each machine has a script in the "installations" folder that includes all the features it wants to use.
The reason they are macros is because use-package wants to run at
the top-level, so you can't just run it within a regular function. So
these macros essentially check if the given feature is enabled, and
execute the body of the feature at the top level if so. That way, the
features that are included actually execute at macroexpansion time.
This configuration includes automated tests. You can run the tests using:
make test # Run all tests
make test-inkling # Test just the inkling package
make lint # Check Emacs Lisp syntaxThe inkling package provides intelligent LLM code suggestions in Emacs:
- Real-time LLM suggestions as you edit code
- Automatic error fixing using LSP diagnostics
- Popups showing code suggestions (or optional inline display)
- Tab-based navigation between suggestions
- Company-mode integration
- Enable with
M-x inkling-modeor the global keybindingC-c C-a - After a short idle delay, suggestions will appear near your cursor
- Use
TABto navigate between suggestions - Press
ENTERto accept a suggestion - Press
C-gto dismiss all suggestions
Inkling includes detailed logging and cost tracking for LLM usage:
M-x inkling-display-statistics- View token usage and cost statisticsM-x inkling-open-log- View detailed log of all LLM interactionsM-x inkling-clear-log- Clear the log fileM-x inkling-reset-statistics- Reset usage statisticsM-x inkling-use-backend- Switch between different LLM backends
