Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The outline is incorrect for expr2.f90/a.f90 #60

Open
certik opened this issue Dec 28, 2024 · 1 comment
Open

The outline is incorrect for expr2.f90/a.f90 #60

certik opened this issue Dec 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@certik
Copy link
Contributor

certik commented Dec 28, 2024

For the code from #55, here is the outline that I can see for expr2.f90:

image

There are several issues:

  • The root node is "a", but rather the root node should be "expr2".
  • There are two symbol "x". The first one points to line 2, as it should. The second one points to line 4, which is empty. It likely is pointing to line 4 in file a.f90, but this symbol should not be part of the outline at all.
@certik certik added the bug Something isn't working label Dec 28, 2024
@dylon
Copy link
Collaborator

dylon commented Dec 28, 2024

We need to update --show-document-symbols to use the DocumentSymbol schema from LSP to represent the symbol hierarchy. That should correct the rendition of the outline list. We currently use the SymbolInformation schema which has been deprecated. Although we supply the correct file path to each symbol's definition, there is likely a bug in VSCode that is makes it not navigate to the correct location of external symbol definitions from the outline list. I conjecture that we can either correct it by migrating to the DocumentSymbol schema or by filtering-out symbols that do not belong to the current document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants