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

Navigation not working #230

Open
wy672515431 opened this issue Oct 25, 2023 · 6 comments
Open

Navigation not working #230

wy672515431 opened this issue Oct 25, 2023 · 6 comments
Labels
possible bug Could be a bug

Comments

@wy672515431
Copy link

Navigation is not working in version 2.4.x(I have tried 2.40, 2.4.1, 2.4.2).After switching back to 2.3.1, it works fine.

Extension version: 2.4.x
Version: 1.83.1 (user setup)
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:48:05.904Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045

@mike-lischke
Copy link
Owner

Cann you tell me which navigation is not working?

@wy672515431
Copy link
Author

1698230028536
for example, I want to navigate to "grammarType". with version 2.4.x, it does not work.

@mike-lischke
Copy link
Owner

I guess you mean cmd/ctlr + click on that identifier to navigate to the defining rule, ok.

@mike-lischke mike-lischke added the possible bug Could be a bug label Oct 25, 2023
@jsnb-devoted
Copy link

I was about to open a separate issue but this but with a little extra detail. If my vscode window reloads or I open a fresh g4 file the go-to definition (cmd/ctrl + click) doesn't work. If I add some arbitrary whitespace to the doc and then hit save then the extension seems to activate and the go-to definitions start working again.

Screen.Recording.2023-10-25.at.8.51.23.AM.mov

I am running on a remote workspace

@mike-lischke
Copy link
Owner

Most of the features need generated parser files (and interpreter data). On opening a grammar that data should be generated automatically (see the .antlr folder beside the grammar) and is updated whenever you change a grammar and save it. It's very likely that the initial generation did not happen, for whatever reason.

@jsnb-devoted
Copy link

Hi @mike-lischke - I can confirm that the .antlr folder is present and has all the generated files. In the screen recording above I'm recreating the issue by reloading my window when the extension features are working (my workspace is remote over ssh) -- when the window is done reloading the features don't work until after the grammar files are saved again.

I would have expected the activation of the extension to happen because the files are already open when the window loads. It's not a huge deal but because I'm over ssh my window needs to be reloaded every time the computer sleeps/ssh connection is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Could be a bug
Projects
None yet
Development

No branches or pull requests

3 participants