5 ms·
I am surprised to see very few setups leveraging LSP support. (Language Server Protocol) It has been added to Claude Code last month. Most setups rely on naiv
by spqw 8mo ago
I am surprised to see very few setups leveraging LSP support. (Language Server Protocol)
It has been added to Claude Code last month.
Most setups rely on naive grep.
- woggy 8mo agoI've written a few terminal tools on top of Roslyn to assist Claude in code analysis for C# code. Obviously the tools are also written with the help of Claude. Worked quite well.
- aqula 8mo agoLSP is not great for non-editor use cases. Everything is cursor position oriented.
- HarHarVeryFunny 8mo agoYes, something like TreeSitter would seem to be of more value - able to lookup symbols by name, and find the spans of source code where they are defined and used.
- alchemist1e9 8mo agohttps://github.com/ast-grep/ast-grep https://github.com/ast-grep/ast-grep
- HarHarVeryFunny 8mo agoI don't see ast-grep as being very useful to an agent. What a coding agent needs is to be able to locate portions of source code relevant to what it has been tasked with, and preferably in more context-efficient fashion than just grepping and loading entire source files into context. One way to do this is something like Cursor's vector index of code chunks, and another would be something like TreeSitter (or other identifier-based tools) that knows where identifiers (variables, functions) are defined and used. Language servers (LSP) are not useful for this task since they can't tell the agent "where is function foo() defined" (but TreeSitter can), since as someone else noted language servers are based on location (line number) not content (symbols). Language servers are designed to help editors. It's possible that ast-grep might be some some use to a coding agent, but looking for syntax/AST patterns rather than just identifier definitions and usages seems a much more niche facility.
- WilcoKruijer 8mo agoThere are actions that don't require cursor position, like document/workspace symbols, that could be useful.
- d4rkp4ttern 8mo agoLSP is currently broken in CC: https://github.com/anthropics/claude-code/issues/15168 https://github.com/anthropics/claude-code/issues/15168