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

Irregular definition jumping #342

Closed
Hermanverschooten opened this issue Dec 1, 2023 · 1 comment · Fixed by #430 or #405
Closed

Irregular definition jumping #342

Hermanverschooten opened this issue Dec 1, 2023 · 1 comment · Fixed by #430 or #405

Comments

@Hermanverschooten
Copy link

When you try to jump to a definition of a function sometimes it just opens the module file.
See demo repo.

Schermopname.2023-12-01.om.16.31.23.mov

So at second 5, i did a gd (equivalent of lua vim.lsp.buf.definition()), and it jumps to the top of the Admin.Documents.Extra module. I then uncommented the alias and although it isn't used now the gd works at second 22, I needed to save the file first.

the demo repo has a NextlsDef module with a function that calls into 2 modules, Documents and Documents.Extra.
The jump to Documents.fetch/1 works, the jump to Documents.Extra.remove/0 only when the alias on line 3 is uncommented and the file is save.

@mhanberg
Copy link
Collaborator

mhanberg commented Dec 1, 2023

Confirmed the repro locally, thanks for that!

I think this might be related to #261 and/or #298

You can notice that if you trigger to to def on the parens, it takes you to the mod.

when adding a comment below with the full alias, you can see that it all lines up:
CleanShot 2023-12-01 at 14 41 50@2x

its a little confusing that the function call seems to not be there. will need to investigate the symbol database to see why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment