You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a vim/neovim plugin that need to retrieve the all the tests of the current package. I would also want to list all the methods of the struct under the cursor.
What work around did you consider?
I tried using DocumentSymbols query to retrieve all the symbols in the current package, then I filter it down. But this doesn't cover methods or tests defined in another file of the same package.
I also tried using the WorkspaceSymbols query and use the package name as prefix, but the package name is not the full import, so the symbols returned could be from another package. E.g. I have a github.com/jackieli-tes/errors.Is and if I filter workspace symbols by ^errors.Is it returns the std's errors.Is
What solution do you want to see?
If #37237 is implemented. I believe all of the above problem should be solved.
Alternatively, most of the queries I'd like to have are all package related. So I propose adding and lsp command:
Query the package symbols of the package a given go file belongs to.
// The go file URI
// A query string to filter symbols by