logoalt Hacker News

throw478239yesterday at 11:42 PM1 replyview on HN

This is not accurate. Most LSPs do provide text editing tools, which the Language Server Protocol calls "code actions". These actions do things like: reorganizing imports, expanding macros, extracting a selection into a function, or converting one type of control flow into another (e.g. if to match). Common LSPs, like rust-analyzer and Ruff (Python) support code actions. Editors also expose code actions: Zed, for instance, exposes actions under the default keymap with the binding Command + .

source: https://microsoft.github.io/language-server-protocol/specifi... and https://microsoft.github.io/language-server-protocol/specifi...


Replies

firasdyesterday at 11:55 PM

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?

show 3 replies