eclipse-jdtls / eclipse.jdt.ls

Java language server
1.79k stars 399 forks source link

add support for linkedEditingRange #1919

Open yyoncho opened 3 years ago

yyoncho commented 3 years ago

Very handy for renaming local variables/methods.

rgrunber commented 3 years ago

lsp4j certainly supports it. The problem I see for Java, is that the API is only meant for linking content in the same document. However, renaming a public field, or method declaration can have implications for many other source files in the project.

It seems like it would only be safe for local variables, and private members of a class.

yyoncho commented 3 years ago

FTR the clojure-lsp returns error if you try to call linkedEditingRange for something used outside of the current document which IMHO makes sense for this API(at least I dont see a reason not to do it like that).