3 ms·
>And every single language server has to reimplement all these from scratch. This is mostly true about IDEA as well. Take a look at the extractFunction impleme
by matklad 6y ago
>And every single language server has to reimplement all these from scratch.
This is mostly true about IDEA as well. Take a look at the extractFunction implementation from IntelliJ Rust:
https://github.com/intellij-rust/intellij-rust/tree/6b2c4dfaa8f1a27efbd4c0580e868a3df14de92d/src/main/kotlin/org/rust/ide/refactoring/extractFunction https://github.com/intellij-rust/intellij-rust/tree/6b2c4dfa...
It is based on a generic `RefactoringActionHandler`, and not on the specialized `ExtractFunctionActionHandler`.
There's relatively little code sharing you can do for high-level things in IDEs.
The use interface sharing is another thing, and that is exactly what LSP achieves: it standardizes common actions across many languages.