Closed ehedbor closed 4 months ago
In case of a conflict, goto declaration will simply return the first declaration it finds. This may affect things like multiple inheritance (this begs the question: if multiple classes declare the same component, which one should be used?).
The C++ language server extension from Microsoft will open a small view with a list of all definitions. We could at some point do something similar:
Edit: added links to draft pull requests
We have more time to work on fixing the PR now. We plan on splitting things up into multiple pull requests as you requested. This means we'll have to basically manually rewrite the git history but it was a mess anyways so no harm there. Currently planning on the following:
Replaced by #26
Adds a first draft of goto declaration. Also adds support for multiple files and incremental parsing.
There are some known issues with the implementation:
foo.bar
,bar
will not be found if it was declared in a superclass of whateverfoo
is). This is due to a bug that caused infinite recursion when the feature was enabled.LSP.LocationLink
s to return the position of symbols we find. The advantage of this is that it allows one to separately specify both the declaration (VS Code shows this in tooltips) and the symbol being defined (VS Code highlights this when going to the declaration). However, we did not have time to defineinner
/outer
declarations.