I haven't done anything fancy with integrating AI tools into Emacs, but after playing with Copilot a bit in VSCode, I decided that I wanted to at least get the most basic autocomplete feature working.
All I did was install copilot.el in Emacs, and now I can use it to autocomplete.
Let's record a demo while I write this blog post!
It supports the basic features I wanted:
- ghost text
- accepting suggestions with
TAB - cycling through suggestions (I bound to
s-upands-down) - Accepting by word (I bound to
C-right)
Honestly I haven't used it often enough to get those in my muscle memory (except TAB), but I have definitely gotten mileage out of it.
Maybe eventually I'll rig up more sophisticated LLM integrations into Emacs. Meanwhile I am exploring other tools more often.
What I'd really like for completion in Emacs is a way to use other models such as Claude or other LLMs instead of Copilot, but I haven't found a good way to do that yet. There are a few that support local models:
- emacs-copilot ... 2 years old and I'm unclear what models I could run that would work well.
- wingman seems to be actively maintained. Requires a LLama model.
There's also codeium.el which appears to use Windsurf as its backend.