svls icon indicating copy to clipboard operation
svls copied to clipboard

Goto definition functionalities not working

Open jagjordi opened this issue 4 years ago • 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

jagjordi avatar Oct 14 '21 17:10 jagjordi

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.

jrmoulton avatar Oct 29 '21 17:10 jrmoulton

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 avatar Mar 15 '22 17:03 patgro1

@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 avatar Nov 21 '22 16:11 DaveMcEwan

Duplicate of #58

DaveMcEwan avatar Nov 21 '22 16:11 DaveMcEwan

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

patgro1 avatar Nov 23 '22 15:11 patgro1