Comment by joshuacc

2 days ago

Cursor, Copilot, Roo Code, Cline, among others.

Hi, I just looked up and two weeks ago someone made this suggestion in Cursor forum

https://forum.cursor.com/t/support-of-lsp-language-server-pr...

> Feature request for product/service

>> Cursor IDE

>> Describe the request

>> It would be a huge step up if agent could interact with LSP (Language Server Protocol).

>> It would offer :

>> renaming all instances of a symbol over all files in one action

> quick navigation through code : fast find of all references to a property or method

> organize imports, format code, etc…

And last Friday a Cursor engineer replied "Thanks for the idea!"

So how does the AI agent in Cursor currently have access to LSP?

(I am most interested in having the agent use LSP for type checking, documentation of a method call, etc. rather than running slower commands)

(note, there is an open PR for Zed to pull LSP diagnostics into an AI agent thread https://github.com/zed-industries/zed/pull/42270 but it would be better if agents could make arbitrary LSP queries or something like that)

  • Cursor Agent can get diagnostics as far as I'm aware. Using LSP for renaming and stuff like that, I haven't seen yet.

    • Oh ok, thanks.

      It would be so cool if LLMs could get the type of a variable when it's unclear (specially in languages with overloading and whatnot). Or could get autocomplete if they get stuck with a code. Really I think that agents and LSP should be hybrid, and maybe the agent could inform the LSP server of some things like things to warn (IDE diagnostics could be driven by a combination of LSP and AI agents)