svls
svls copied to clipboard
Support "Go to definition" and "Go to declaration"
I see that the goto_definition
and goto_declaration
methods for the LanguageServer
trait are not implemented in the SVLS backend. So "go to definition" and "go to declaration" in the VSCode extension will not work.
Has there been any work on this? I can contribute to this if sv-parser
provides enough info to support this feature. I'm reading up on this to see what work would need to be done to implement this. It's probably the one feature preventing me from switching from DVT to VSCode for SystemVerilog development full-time.
I think something needs to take the AST from sv-parser
and convert it into a symbol table. As far as I can tell, this isn't done yet in sv-parser
.
The symbol table can hold the locations in each file for each symbol. From there, the symbol table needs to be searched to find matching definitions or declarations.
Not sure if this is something that'd make sense to be in sv-parser
, or if it should be in another crate (i.e. sv-symbol-table
) that depends on sv-parser
.
I think the symbol table creation should be in another crate because sv-parser
is parsing library to provide AST.
I want to work on it, but I don't have enough time now.
Okay. I'll try to look into adding this crate to sv-parser
.