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

Goto definition functionalities not working #89

Open
jagjordi opened this issue Oct 14, 2021 · 5 comments
Open

Goto definition functionalities not working #89

jagjordi opened this issue Oct 14, 2021 · 5 comments

Comments

@jagjordi
Copy link

I am using svls in emacs, I try to use the function lsp-ui-peek-find-definitions and I get the following error:
image
This is the output from lsp-describe-session
image
Could someone guide me on how to solve the issue

@jrmoulton
Copy link

I'm also running into this same issue. @dalance what would need to be done to get goto/find definitions implemented (if they're not already)?
I'm new-ish to rust but with some direction I could work on implementing the feature.

@patgro1
Copy link

patgro1 commented Mar 15, 2022

Correct me if im wrong but right now the language server does not parse the full folder structure recursively nor maintain a cache of what exists where. I think the steps would be

  1. create a cache of all the modules/classes/functions and all recursively from the root of the project
  2. Create functions that return definitions, documentation, implementations and such from the cache
  3. Link these function to the ls protocol

Would that make sense @dalance

@DaveMcEwan
Copy link
Contributor

@patgro1 That sounds sensible to me. However, number 1 is quite a large effort and probably shouldn't be done inside svls. Number 1 is essentially a compiler, maybe with an elaboration step. If there's a separate project which can create a cache of compiled objects, that would certainly be exciting to integrate into svls.

@DaveMcEwan
Copy link
Contributor

Duplicate of #58

@patgro1
Copy link

patgro1 commented Nov 23, 2022

@patgro1 That sounds sensible to me. However, number 1 is quite a large effort and probably shouldn't be done inside svls. Number 1 is essentially a compiler, maybe with an elaboration step. If there's a separate project which can create a cache of compiled objects, that would certainly be exciting to integrate into svls.

Assuming I wanted to do that in some way, would starting with the parser crate be ok or I would need to do it all from scratch?

also we could probably « negotiate » a representation of that cache in advance to facilitate any integration into svls (especially since it would be its main purpose)

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

No branches or pull requests

4 participants