47 comments

[ 4.9 ms ] story [ 57.1 ms ] thread
Pretty cool! I love that these battle proven editors (emacs and (n)vim) seem to follow along with new technology, even though one might think overwise given their age.

I hope this comes to vim as well!

Anyone have good results with something similar for Neovim?
Looks better than my current Claude Sonnet integration via copilot.
love the ability to add tools to the mcp server - would expect nothing less from emacs :)

as a long time emacs user i've only recently started really writing my own elisp tools, but claude is pretty good at writing elisp so i've been doing more there (sometimes it loses track of parentheses and you need to fix that, but overall pretty good)

I'll def be trying this out alongside steve yegge's efrit which kicks the emacs up to 11 by letting the agent just write and evaluate arbitrary elisp expressions https://github.com/steveyegge/efrit

I'm happily using https://github.com/stevemolitor/claude-code.el which is a mere terminal wrapper (including a nifty Transient menu). But just by virtue of running inside Emacs you get a lot of power - it didn't take me a lot of effort to create an efficient, customized workflow that felt much more streamlined than my older iTerm usage.

I'll keep an eye on this new offering though.

There's also https://github.com/editor-code-assistant/eca-emacs which comes from the author of clojure-lsp, a very popular package within the Clojure community. I'd also been wanting to try it.

For both of the more advanced offerings, I tend to be a little cautious when adopting tools I'm trusting my productivity to. Most ambitious projects need to iron out misc stuff during their 'big bang' phase.

Like LSP and tree-sitter, I think AI coding tools like Claude Code or Aider are very good news for niche editors like Emacs or Vim. Instead of struggling about implementing advanced IDE-like features, they can integrate with these tools relatively easily, and focus on other editing related features that set them apart. In fact, IMO it makes these editors more competitive because they are highly customizable and easier to integrate with these tools.
I've tried out a similar project (claude-code.el).

I use Spacemacs in evil-mode and I found it very frustrating to try and type into the Claude Code text box (often my cursor would be somewhere weird, the terminal emulator just really did not seem to "understand" that I was not in Insert Mode). I wound up deciding that I'd rather just use Claude Code in the terminal. The Claude Code text box is ALSO annoying there, so I often just write out instructions in some file (in emacs) and tell then tell CC to read it.

Does this project have any facilities for authoring prompts in a temporary buffer or something?

I apologize for my ignorance in asking this question but is Emacs considered an IDE? I thought that was a term reserved for large, graphical editors like IntelliJ, Eclipse, or Visual Studio.
This is profaning the temple of St iGNUcius
Lately I've been seeing a lot of derision from the Emacs community of the consideration for integrating these kinds of tools with Emacs, but I truly think that's much more hurtful than helpful. Although the current development and usage of AI in software development may not closely resemble the techniques used at the time, it seems to me that Emacs' history is inextricably linked to the MIT AI Lab. It feels weird then that people today would shun the inclusion of AI integration into a tool that was produced from such a working group.
I want something like this for helix!
I’ve always thought emacs is the ultimate editor for AI agents. The agent has so much access to the state of the editor itself and can even easily change editor behavior with elisp. I feel like editors which expose the level of customization like vim and emacs could potentially have a huge advantage.
This is true - and a reason I'm not sure about this package. I'll still try it, but I don't think it's the right way forward.

Pretty much the only advantage is that you get access to logic available in the claude code CLI - which in large parts probably already exists in emacs or extensions. On the downside it'll bind you to claude code.

I'm generally using a generic LLM wrapper - emacs has two good ones, gptel and llm. I have both configured, as both are required by some of the extensions I'm using, but currently prefer gptel: It seems to be more advanced, especially when it comes to tool use.

Advantage of that approach is that when you're hitting a wall with one LLM being stupid with one specific issue you can just switch to a different one. Or you can use the same environment with locally hosted LLMs.

Disadvantage is that the IDE/project functionality is not tied up that nicely yet - there are a few attempts (like minuet or evedel), but nothing I really got into.

Currently I'm mostly doing a chat buffer, and the LLM has tools available to inspect and to some extend alter the current state, published here: https://github.com/aard-fi/gptel-tool-library - that works pretty well on a per file basis, and to some extend it can figure out project details, but overall it lacks project info - in part that's a context limitation thing, where that info should be provided as additional context for each instruction (which I assume the CLI is doing).

What this approach also nicely enables is fun experimentations:

- https://github.com/aard-fi/buffer-turtle implements simple turtle graphics in an emacs buffer, and has bindings for the LLM to control the turtle - https://github.com/aard-fi/arch-installer has the glue to have the LLM interact with a serial port, and some glue (like basic ANSI escape parsing) to make the result look somewhat reasonable in an emacs buffer. That allows it to do stuff like trying to install Arch linux in a VM

Both repos have links to youtube videos with some runs.

I wonder if this can work with OpenCode (Claude Code fork which allows for other model providers: https://github.com/sst/opencode)?

I really don't like being tied to a particular provider or model, switching models has been really helpful to get past blocks and save money (especially with Deepseek!).

And, of course, I need to use Github Copilot's Open AI-compatile API at work...

While I'm happy that simultaneously there are at least 5 known Emacs/Claude Code integration packages, with seemingly 2 or 3 battling it out on Reddit and elsewhere, I feel like the best implemented one is the quiet one that no one has ever talked about.

https://github.com/yuya373/claude-code-emacs <- it literally implements every feature that every other ones have.

my biggest issue with agents in neovim or emacs is that I also use emacs and neovim to open or edit sensitive data (like ssh keys, etc) that I don't want to upload to a random LLM.

A quick solution I devised is to use bubblewrap to get a fully separate instance of nvim. Something along the lines of

  alias lvim "bwrap --bind / / --bind $HOME/.config/{lazy,n}vim --bind $HOME/.local/share/{lazy,n}vim --proc /proc --dev /dev nvim"
 
works great (note: fish alias)
(comment deleted)
Gptel has been working great for me. I'd be interested in checking this out but I only have so much time to set up and test new tools. What features would make it worthwhile to switch from gptel?
I'm really glad that emacs is integrating modern tooling like LSP and tree-sitter, now Claude Code, but this approach is showing its age. I'm an emacs user of 20 years and honestly it's getting hard to configure everything these days. Claude Code before the IDE integration was actually the easiest thing to get working (since it just worked and then auto-revert-mode keeps my buffers in sync.)

I'm on a new MacOS install for $WORK trying to get lsp and ts work with a Typescript/Go repo and after some $PATH wonkiness (my default shell is not the same shell as the one that emacs launches in) got typescript-ls working but gopls is still having issues being downloaded. I haven't spent the hour or two it would probably take to figure out why the in-built downloader can't put gopls in the right place.

I'm curious what emacs users are doing these days. I'm using Zed right now and really enjoying it but it's really hard to give up 20 years of emacs and I do love how emacs can scale from small one-off config file editing to huge projects and I love how configurable it is.

Is neovim better in this space? Should I be learning how to debug elisp better to understand how the commands interact with my environment? I've been using emacs keybindings (in Dvorak at that) for so long I don't know if I'd enjoy the neovim editing experience.

Btw, LLMs are actually quite helpful for configuring Emacs, in particular for creating custom functionality..

But yeah, I broke my home Emacs setup somehow so that rust-mode no longer works in some situations. I have my config in git, though, so maybe I'll figure it out!

At least I've started migrating to use use-package for configuration, to bring some structure to the configuration.

Zed does seem rather interesting, but I don't ever see it being as configurable/extensible at runtime as Emacs. I suppose one could always just implement such features into the Zed itself; I presume its code is not too indimidating, given it's a modern code base and not likely to break in unexpected ways.

> Typescript

If Typescript is a big part of what you need to deal with on a daily basis, then at some point it makes sense just to use VSCode. And BTW, thats totally by design and a part of Microsoft's developer aquisition strategy.

`use-package` has pretty much simplified everything:

  ;; c
  (use-package c-mode
    :ensure nil
    :defer t
    :mode "\\.cu?\\'"
    :config (setq c-default-style "gnu"
                  c-basic-offset 2)
    :hook ((c-mode . lsp)
           (c-mode . bmacs-ide)))
This is awesome. I love emacs and I love integrating AI into my coding work flow.

What I really want is to be able to run something like this locally for, say, less than $2000 in computer hardware. Is this feasible now or any time soon. Anyone out there using agents with local models for coding?

This is great, and I need it and will use it, but what I need even more is some kind of integration with org mode (or just note taking generally). I found out the hard way that github/copilot deletes conversations after 30 days! So much for building a knowledge base with an AI assistant! I really need something a bit like Goog's `notebookllm` for capturing research, except I'd like to control it locally.