Claude Code IDE Integration for Emacs

217 kgwgk 66 8/6/2025, 1:17:38 PM github.com ↗

Comments (66)

wyuenho · 2m ago
[delayed]
blahgeek · 2h ago
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.
mikece · 1h ago
Is there a standard for integrating agentic coding tools into an editor similar to how an LSP allows the integration of language-specific features?
benreesman · 1h ago
Its not at anything like the adoption of MCP or especially LSP, and it takes a more "foundational and composable library of primitives" approach than "wire protocol per se" approach, but `gptel` has quite the vibrant little ecosystem around it and its just god mode, wall hacks on the VSCode stuff, just blows it away. I'm under extreme time pressure at the moment, I cannot afford to fuck around on ideology right now I have to go for the jugular every day, and that means "fuck the cost" Opus 4 use in `gptel` (though Qwen and K2 are pushing it out of more and more stuff as I learn the quirks, Opus 4 TTFT under load is unusable and when it starts fighting you on clean merge boundaries because its personality vector has been set to "token stingy" its strictly worse).

Its not that I dislike Cursor, its that I dont have time to put up with its compromises for non-extreme-power-user accessibility. I need an extreme power, cost indifferent, tuned for the margins stack.

That's nothing with a VSCode base that I know about, and I've tried Cline and Roo and Continue and written a bunch MCP servers and I measure it all, not even close.

I bet the neovim people have something just as good.

ljm · 40m ago
My 'beef' with Cursor is that the editor is part of the package and you don't really have the same kind of hooks into the agent that you do with Claude Code or similar, which really means you're at the mercy of the Cursor team to prioritise those things on their roadmap. That includes things like the limit of 40 MCP tools that you can only enable globally (and MCP proxies that try to do this dynamically are a bit flakey) - even just using the GitHub MCP blows through that limit because it's all or nothing.

It's good for what it is but I don't love that I have to change to a whole-ass new editor to get access to the agentic additions, when alternatives that require an API key or a more flexible CLI tool can do a better job.

cvdub · 23m ago
Are you using gptel exclusively, or also things like aider/claude code?

I’d love to hear more about your workflow if you have time to share!

benreesman · 10m ago
Sure. I'm experimenting like everyone else, but I mostly use gptel as the primary interaction surface and Claude Code for a range of refactorings and other "more than mechanical, less than creative" edits. Both of these are very (!!!) well complimented by magit, which is so good at AI supervision it seems designed for it, by a genius.

For Claude Code I'm rapidly switching anything I want "vibe coded" into Hadkell for code, Dhall for config, and check-heavy Nix for deploy. Between that and some property tests that I seed and then have Opus elaborate on, you can put Claude Code so restrictive that it just hits the compiler in a loop until useful code comes out. Its trapped: I hoist CLAUDE.md in from the Nix store so it physically can't edit out the brutal prompts around mocks and lies, and -Wall -Werror in GHC gives it nowhere to hide, all it can do is burn tokens and desperately Web Search tool until it gets it perfect ish or I cut off its money because this requires a real LLM minimum and likely a real programmer. If there's a property test welded into the type system it can't even fail to use a parameter: that's an error Claude.

I have a bunch of elisp in // hypermodern // emacs for things like OpenRouter integration and tool use, but frankly, stock gptel is so strong I always wonder if I'm getting my money's worth trying to tune it into the asymptote.

Happy to answer any more questions.

dismalaf · 47m ago
It's always been that way. Emacs has had advanced IDE-like features for as long as I can remember. Vim too.

LSP and TS just make it easier to standardize across editors and languages.

eulers_secret · 6m ago
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...

yoyohello13 · 20m ago
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.
vemv · 2h ago
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.

mijoharas · 44m ago
I tried that for a bit, and bounced back to just using claude code in a terminal. It was a little bit janky in emacs, and didn't have any features that justified not just running a separate terminal window (for me, at the time I checked it out).

I'm wondering if this project will work. It does feel a shame that it doesn't work with the existing mcp.el package[0], but I never got around to setting that up anyways. I wonder if it's a limitation of the package? or not wanting another dependency?

(in addition I've only really played around with claude code a little because I haven't gotten it to a place where I can make it write code I'd consider acceptable for my day job.)

[0] https://github.com/lizqwerscott/mcp.el

pjm331 · 2h ago
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

benreesman · 1h ago
I'm a long time Yegge fan and follower and while I think he's still in the vibe code honeymoon phase and hasn't had the vibe code hangover yet, his bona fides on emacs are up there with anyones.

It was my observation around 12-18 momths ago that LLMs are weirdly good at elisp (which kicked off all the // hypermodern stuff I'm doing.

I think he's onto something with efrit, I havent gotten it dialed yet but its reaaallyy promising.

cristea · 2h ago
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!

benreesman · 1h ago
Neovim and to an extent emacs are where corporate IDE vendors go for ideas.

From ergonomics of the UX, performance, portability, design sense (!!) and theming?

It's like Sun and GNU in the 90s. Those UI/UX folks getting pissed their perfect HSL wheel and black balance got dicked with by some PM which is why the GitHub theme is great not legendary?

They go home and rice Arch or NixOS and just shit on the dayjob stuff.

These people are artists, and hacks follow.

edit: My black balance is calculated on a per-display basis with an HSL-space transform from a hero color by the same NixOS module tree that builds the background from it's own source code as SVG and renders it before downsampling it for the specific display it's on. Of like two people helping beta it, both said roughly "using another desktop is like using the screen at the ATM". DHH is doing something similar with Arch, he's not quite as far along but this is the future.

https://cdn.some.pics/b7r6/68936c070fa56.png

https://cdn.some.pics/b7r6/68936d79c607c.png

bevr1337 · 19m ago
You must understand that a screenshot of your black balance cannot translate to another screen?
benreesman · 3m ago
I do understand that. I was just illustrating that it's possible to do very holistically integrated desktops programmatically and in a way where you can do some math once and leverage it again.

I'm personally a fan of `ono-sendai-blue`, but I have a friend in a defense adjacent space and I gather `ono-sendai-tactical` is enjoyed there. The blacks in these reference palettes are a reasonable starting point for many displays, you'll want to hint for your specific one to get optimal outcomes.

https://gist.github.com/b7r6/581295d8bb905ef598a05fdf2810a07...

https://gist.github.com/b7r6/fbbfb1cf2a3d14927bbe621a9050522...

helsinki · 1h ago
It’s more common that they lead technological advancements in IDEs, not follow. Neovim in particular.
brotherjerky · 2h ago
Anyone have good results with something similar for Neovim?
greymalik · 2h ago
bikeshaving · 32m ago
I tried these, and they seem to mainly be opening Claude Code in a pane in Vim, along with commands to open the pane. It’s missing the features added to the Emacs version like open file awareness, access to text selection, and integrated diff for changes.

It would be really interesting to see a version which exposes Vim as an MCP. I would love to see Claude Code work on the active file, reading from open buffers, typing Vim motions, and taking advantage of Vim features like find/replace and macros. It would be closer to the real pair programming experience, whereas the read and write experience is slow and disjointed from editing.

qwertycrackers · 1h ago
I have tried the CodeCompanion plugin and had good results. I don't use it super extensively but it's nice when I decide to try it.
softwaredoug · 2h ago
I just like having a neovim terminal open with claude code open
adregan · 1h ago
Out of curiosity, do you have a good flow for having a file buffer automatically update in response to claude's changes? I'm perpetually needing to remember to `:e!<CR>` to read the updated file.
gertlex · 36m ago
To offer an anecdote: I've been used to doing `:e!` with vim. I recently finally had a reason to move to nvim... and it's been auto-updating my buffers when I do stuff in `aider`. Very much a, "oh, ok that's nice!" and I haven't dug further.
adregan · 26m ago
I’m actually a neovim user already! This makes me worry that my config has something to prevent this behavior (but I hope not, I hate messing with my config)
yoyohello13 · 25m ago
There is a vim setting to automatically load changes from disk. I can’t remember name of the option right now, but it should be an easy lookup.
helsinki · 1h ago
I think that’s a decent approach, but doesn’t the performance of a Neovim terminal bother you? It simply does not feel as good as a native terminal pane. It’s not as bad as VSCode’s terminal pane, but it still leaves something to be desired.
softwaredoug · 55m ago
I have never noticed any problem...

The main annoyance is dealing with newlines

OrderlyTiamat · 54m ago
I've noticed no problems, and I'm usually pretty controlling about performance- what am I missing?
dosethree · 1h ago
Just use tmux and split windows
apwell23 · 1h ago
they how do you say. look at these lines of code to claude?
softwaredoug · 27m ago
I just say "look in file.py at lines 20-30" or "See in function FooBar where we foo the bar".
oblio · 1h ago
Can you prompt it? A bit manual, but hey. I wonder if you can script visual selection in Neovim to output full file path plus line number range, for direct copy paste.
apwell23 · 1h ago
you can start neomvim with a network ( neovim --listen) socket and tell calude

" look at neovim at this network socket and get current selection"

This actually works :)

cml123 · 1h ago
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.
uludag · 46m ago
The beauty of Emacs though is that it puts the user in full control. There is nothing in the world stopping anyone from modifying anything in Emacs (at least on the Elisp layer), hence packages like this.

VS Code on the other hand is designed to fracture [1]. MS can and has given proprietary API access to their blessed tools, forcing others to go through their much less capable extension API, hence the plethora of vscode forks. Even if you had the most motivated, excited group of people wanting to work on the latest and greatest LLM interactions with VS code, they would most likely be forced to fork. On the other hand, it just takes one motivated Elisp dev to implement whatever they want and make any external package they want integrate with it.

Also, I think the derision from the Emacs community may be a bit overblown. I'm constantly seeing AI/LLM related plugins appearing for Emacs and they tend to get decent traction (e.g. https://github.com/karthink/gptel).

[1] https://ghuntley.com/fracture/

paddy_m · 1h ago
This is due to Richard Stalllman. He thinks that integrating "non-free" alternatives when free alternatives don't yet exist slows down free software development. Not just free as in freedom alternatives, not just free as in GPL licensed, but free as in FSF controlled projects. He did the same thing with linking extensions to GCC, LLVM debugger integration into emacs (fuzzy on that one), possibly treesitter into emacs, bzr vs git for emacs code source control, and a CI build farm for emacs. In each one of those cases, he eventually relented and the core project, eventually integrated the non-free alternative years later.

In the meantime this delaying didn't stop the non-free alternatives, but it did slow down adoption of the core project. This is attrocious project management that is driving people to non-free software. In the most egregious cases (bzr and CI build farm), it was done only because of his ego and wanting the FSF to matter.

benreesman · 50m ago
A lot of us are grateful in some abstract way for all the foundational work RMS did both technically and organizationally to preserve what remaining software freedoms we still have, but got off the bus a long time ago. He got really weird and it was on some "no fly zone" shit.

There's an `emacs` community that recognizes the history without being involved in any contemporary sense.

bowsamic · 39m ago
Why did you?
skydhash · 48m ago
Where would they integrate it. Emacs is a small core of C code. Almost everything is Elisp and in the same standing as third party packages. I’m not seeing what being in emacs core brings to an AI package?
paddy_m · 12m ago
Well the linking into GCC was a C code issue. For emacs, there is a large collection of elisp that is shipped with the official package. Preventing worthy enhancements of that core package solely in the name of a distorted view of freedom hinders emacs and the adoption of emacs.
Guthur · 35m ago
You clearly misunderstood the problem.

The entities he is so adamant against are not benign or passive, they actively try to capture your freedom for rent seeking behaviour.

Microsoft, Apple, Amazon etc, have not got to where they are without this behaviour and they are so powerful that they have in many cases captured even public money from large governments for decades and are exceptionally sticky once allowed in.

LLM provide an exceptional opportunity for us to free ourselves from these captor interests, but we need to looking to develop them.

RMS has been proven correct on so many things from standard Microsoft behaviour, and planned obsolete to the licensing rug pulls of so called open source projects.

The question is not about stopping non free, that's a ridiculous objective, but if you don't have any principles you are going to have nothing solid to stand on in response to their nefarious and extractive behaviour.

paddy_m · 14m ago
I haven't misunderstood the problems that RMS talks about, I agree with his prescient analysis. I firmly disagree that RMS the person is the best person to lead a software producing organization that aims to deliver a free future.

A simple reductive example. Imagine a great software leader that leads an org that writes great code and generally achieves the org's goals, but once a week, they say something offensive that discourages 1/10th of new users. A better leader would be someone who does all of the same things, except for the offensive comments.

I am saying that RMS makes offensive distracting comments, and regularly makes project manager choices that slow the adoption of free software. If you criticize him, people come back to "but he's right philosophically" which he is, and that misses the point. He has wrapped the FSF into an ego play for himself where he is in control or at least an important roadblock to software progress. If RMS cared as much about software freedom (as opposed to his ego) as he says, he would work to allow better leaders to develop and have power in the FSF org.

qiine · 57m ago
this is just sad
bowsamic · 44m ago
I didn’t know MIT AI lab was involved in the modern AI boom, that’s interesting
benreesman · 40m ago
Asionometry has a great video on it: https://youtu.be/sV7C6Ezl35A

The Levy book Hackers has a ehole third of the book about it.

bowsamic · 38m ago
Haven’t got time to watch that but that book seems quite old. Are you sure it talks about LLMs?
benreesman · 32m ago
They weren't called LLMs, but they had neural networks and hardware optimizations for AI and huge teams of people tirelessly labeling stuff to make it look smarter than it is :)

There is some surprise factor at the GPT-3 -> gpt-4-1106 jump for people who know the history of AI generally and who were around a lab during the ImageNet days, but not as much as everyone is acting like.

The last two years are a notable but by no means unprecedented rush towards the next wall. There's even a term for it: AI Summer is short and AI winter is long and its about as predictable as the seasons in Game of Thrones / ASOIAF.

neutronicus · 1h ago
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?

cmrdporcupine · 49m ago
I tried it and it has similar problems. Claude Code is not a good "citizen" embedded elsewhere as it wants to control the terminal completely.

I use default emacs keybindings, which are a bit friendlier with this since they're similar to the bash/readline keybindings it uses... but it's still jarring.

mikece · 1h ago
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.
reedlaw · 1h ago
Emacs is practically an operating system (the vim joke being that it lacks a good editor). With git integration through magit, LSP server for language integration, and Projectile for project management, it very much acts like an IDE.
greenavocado · 1h ago
Emacs as PID 1

Emacs standing alone on a Linux Kernel

https://web.archive.org/web/20200110131523/http://www.inform...

mosburger · 1h ago
Queue the old adage ... "Emacs is a great operating system, what it needs is a good editor."

I'm not sure there is a rigid enough definition of IDE to say whether Emacs qualifies or not. I think it does by virtue of its extensibility, but I could definitely see a legit argument that it's merely an editor because it doesn't have a lot of the tooling of something more modern. I think what you consider to be an IDE (IntelliJ, VS, etc) is something that didn't exist until modern GUIs. Prior to that, terminal based things like Emacs (or LSE on VMS) were the closest analog.

mikece · 1h ago
I realize my definition is purely subjective in that I deal with Visual Studio and VS Code almost exclusively and that the VS Code team is instant that they make an editor and not IDE. For me an IDE has graphical tools for building UIs and other workflow items as well as language-specific compilers and tools built in. Like I said, subjective based on my experience (and my experience doesn't include Emacs).
skydhash · 1h ago
Emacs is a text environment (which can also display images). It can also launch process and have IPC built in. So everything that works with text can be brought into emacs. And often, the only advantages of GUI is animation and aesthetics (to appeal to beginner). Text interfaces can be more productive.
gjvc · 1h ago
"Cue"
oropolo · 1h ago
It's not an IDE: it's a religion.
globular-toast · 1h ago
It is if you want it to be. I believe Emacs had one of the first GUIs for gdb (GNU Debugger) so it's always been possible. But it's as much or as little as you want it to be really.
apwell23 · 1h ago
I think its just using claude code terminology of "IDE integration" . not implying that emacs is an IDE.
Barrin92 · 1h ago
an IDE is just what the name says, an integrated development environment. Emacs has robust support for managing projects, compilation, you can debug programs from Emacs including graphically, Magit is exceptional for version control, it's got built-in LSP support now with Eglot, and so on.

So if you want it to be, yes and with a lot of support out of the box these days.

hit8run · 43m ago
I want something like this for helix!
jact · 1h ago
This is profaning the temple of St iGNUcius
rurban · 2h ago
Looks better than my current Claude Sonnet integration via copilot.
apwell23 · 1h ago
claude team unfortunately didn't make it easy for anyone to build their own. Take a look at this if you are hoping to build your own ide integration

https://github.com/coder/claudecode.nvim/blob/main/PROTOCOL....

https://github.com/coder/claudecode.nvim/blob/main/ARCHITECT...