I’ve seen that it is possible to use tree-sitter for refactoring and completion suggestions. I am wondering if it possible to parse all project files (e.g. got files) at once so that completion and refactoring works project-wide and not only on a per-file basis.
Another (and harder but perhaps better) way to go around this would be to parse all the included/imported files.
I’m also very new to tree-sitter, but I have been wondering the same thing.
More specifically, I wondered if tree-sitter could be utilized to generate ctags or something similar.
This should be more accurate than regex based ctags (similar to syntax), and also should be able to provide a better low-overhead navigation and completion.
Something like this could be a starting point. I think it’s easier to write from scratch a plugin to use the output as source for some completion engine and maybe for some syntax check. Converting it to ctags format means losing information.
Also, find a way for automatic addition is not easy, and I don’t know if one can specify the already compiled grammar to use