Skip to content

Comment on Interview with Boris Cherny [video]parent

Comments

The relevant points have already been made: (1) LSP is a JSON-RPC protocol, not a CLI app, and (2) Language Servers that implement LSP often utilize AST manipulation, even the resultant manipulations are exposed to the client via character ranges.

Still, these links may be of interest:

TypeScript’s language-service implementation of the “Move to file” refactor: https://github.com/microsoft/TypeScript/blob/main/src/servic...

Documentation for how `typescript-language-server` exposes that refactor as an opt-in code action: https://github.com/typescript-language-server/typescript-lan...

`ast-grep`, an AST-based search and transformation tool that may be closer in spirit to the cli functionality you describe, albeit more general-purpose: https://github.com/ast-grep/ast-grep

Interesting. But I think this also proves my point that if this particular LSP server has the move statements functionality the pattern is not default integrated into Claude Code, OpenAI Codex, etc. Like you’d have to figure out a way to keep this server running yourself as if you were running Redis and asking the harness to manage your ToDos in it or something

Jesus christ dude, what you're describing is what an LSP is. It is a server that runs, and integrates with editors, and claude code uses the LSP the same way an editor does. It does, in fact, stay running in the background along side claude code as an independent process. There's no "gotcha" here.

Again this is exactly equivalent to saying Claude Code doesn’t need a todo tool (which it has ie TaskList) cause you can run Redis. What you have demonstrated is that there is a lengthy workaround depending on if a particular LSP server implements a move method .. to do text editing

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.