Hi community!!!
Today, I want to share something with you, you might know (or not) that whilst your AI agent is playing his little guessing game in VS Code navigating your humongous codebase, there is a plethora of intelligent functionality just sitting down right under your noses, I am talking about LSPs or language server protocols. When you do (Ctrl+Click) on a function call site and you're taken to its implementation, that's the LSP doing its magic quietly for you, keeping all the references and implementations to your classes and functions. Now CC(nickname for Claude Code) or any other AI agent, didn't do very well when I was refactoring a codebase. The task was simple, I asked CC to rename all interface definitions and implementations following the pattern ISomeInterface to SomeInterface. Either CC missed some references or renamed the wrong ones, cause of course, he was grep-pingggg, that frustrated me out and I built Prism (officially Prism LSP), a VS Code Extension that exposes the VS Code API to CC for accessing LSP functionality through MCP. So now CC doesn't do raw grep-pinggg as a tourist without a map in the terrains of your codebase but he uses the LSP provided map and knows exactly what and where he needs to look at. It not only makes CC efficient in completing a task but also reduces the token usage which would be wasted on multiple sessions till the developer would be sure that CC did its work accurately. Good thing is, you can use it with any language of your choice till there's an LSP running down.
Note: It's an open source project, so feel free to submit feedback or open a PR on github!
https://marketplace.visualstudio.com/items?itemName=MalaikaNoor.prism-lsp-bridge
Top comments (0)