dalance/svls

Goto definition functionalities not working

jagjordi opened this issue · 5 comments

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

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.

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

@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.

Duplicate of #58

@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)