logoalt Hacker News

firasdyesterday at 11:55 PM3 repliesview on HN

Come on what are we talking about. Ruff is a linter. Can you show me any LSP server that can move an arbitrary function from file1.ts to file2.ts based on calling it on the command line?


Replies

jaggederesttoday at 12:16 AM

They're not command line applications, they use JSON-RPC inline, and it's an interactive flow, so you need the client to actually persist state.

So what you'd see in the LLM traces, for example, is a couple back-and-forths using JSON-RPC. It absolutely works at the moment, and claude code will happily use it if everything is set up correctly, just tested it using https://github.com/typescript-language-server/typescript-lan...

show 1 reply
wild_eggtoday at 12:14 AM

I've had decent results telling agents to use emacs for structural editing operations. Pretty rare that I need to move a function across files verbatim but that should only be a few extra lines of elisp.

verdvermtoday at 1:43 AM

not sure if Go pls supports moving between files, but it does have some sophisticated edit features

https://go.dev/gopls/features/transformation

it does look to have a method for moving a function to a new file

I give my agent access to go pls and find it overall beneficial, based on vibes eval. Its way easier to ask LSP everywhere a function or field is used versus grep, saves a lot of tokens