Comment by 1123581321
2 days ago
This is an ignorant question, but, what is the benefit of this if you also have your project open in an editor or IDE (presuming they integrate language server?)
If you're vibe coding without an editor, would this have any benefits to code quality over a test suite and the standard linter for a language?
As part of a bigger refactor, you want to rename some variables. With an LSP hook, the LLM can make the change (more) reliably.
The LLM wants to see the definition of a function. More reliable than grepping.
The same reason you want an LSP in your editor: so you get inline docs and error messages, autocomplete, jump to definition, refactoring actions etc.
But what is the benefit for Claude Code? You don't write code in Claude Code so why would I need autocomplete or jump to definition? Does Claude itself use them instead of e.g. grepping? Struggling to understand how it helps.
Yes, it's for Claude itself.
I'd like to know what more of the use cases are too, but one would be for doing renaming operations where the LSP understands the code and will tell the caller exactly what edits to make to which files. So I assume with LSP integration you could then ask Claude Code to do the rename, and it would do it per LSP instructions rather than itself having to understand the source code and maybe doing a worse job.
> Does Claude itself use them instead of e.g. grepping? Struggling to understand how it helps.
That would be the idea.
Your test suite and linter don't code. They don't help your agent look up definitions of variables, etc.
Ah, it's about making language documentation available, and making crawling the app for understanding cheaper/more direct?
It's like making your IDE available to them.