prabirshrestha / vim-lsp

async language server protocol plugin for vim and neovim
MIT License
3.1k stars 304 forks source link

How can I go to definition of a specific function not in cursor #1487

Closed Miaodric closed 1 year ago

Miaodric commented 1 year ago

Just like cscope, :cs f g ***

Miaodric commented 1 year ago

And how to solve regex search issue?

prabirshrestha commented 1 year ago

You can try LspDocumentSymbol, LspDocumentSymbolSearch or LspWorkspaceSymbolSearch if the LSP server supports it. Usually it isn't regex but you can search and narrow it down.

Miaodric commented 1 year ago

You can try LspDocumentSymbol, LspDocumentSymbolSearch or LspWorkspaceSymbolSearch if the LSP server supports it. Usually it isn't regex but you can search and narrow it down.

If I want to search a function like get_os, How can I input in command mode to pass a parameter to search?

:LspReferences get_os CAN NOT be supportted

Miaodric commented 1 year ago

You can try LspDocumentSymbol, LspDocumentSymbolSearch or LspWorkspaceSymbolSearch if the LSP server supports it. Usually it isn't regex but you can search and narrow it down.

If I want to search a function like get_os, How can I input in command mode to pass a parameter to search?

:LspReferences get_os CAN NOT be supportted

@prabirshrestha How to pass a parameter to search in command mode?