OpenModelica / modelica-language-server

A VS Code language server extension for Modelica.
Other
5 stars 2 forks source link

Tree-Sitter Tagging #18

Open AnHeuermann opened 8 months ago

AnHeuermann commented 8 months ago

Tree-Sitter has a Code Navigation Systems used for tagging.

Maybe it's better to use that feature instead of doing something similar in getAllDeclarationsInTree. That way the language server is less depending on the language and doesn't need to know specifics of the tree grammar itself.

For example the server can test for the generic @definition.function instead of the very specific node name function_definition.

To test this https://github.com/OpenModelica/tree-sitter-modelica needs to implement this feature, see https://github.com/OpenModelica/tree-sitter-modelica/issues/15.