eclipse / lsp4e

Language Server Protocol support in Eclipse IDE
Eclipse Public License 2.0
60 stars 53 forks source link

Open Declaration (Ctrl + Click / F3) does not collect declarations #969

Closed travkin79 closed 4 months ago

travkin79 commented 4 months ago

I checked an issue in a CDT LSP editor concerning the "open declaration" feature. In a C++ code example, I was able to jumpt to a method's definition, but not to its declaration.

I checked the LSP4E implementation in org.eclipse.lsp4e.operations.declaration.OpenDeclarationHyperlinkDetector and it turns out, the LSP endpoint textDocument/declaration is not used at all (see source code excerpt). I think, in addition to the definitions (and type definitions and implementations), the declarations should be collected here, too.

image

Are there any objections?