mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
lsp: add workspace/symbol (#12224)
* lsp: add workspace/symbol * refactor symbol callback * set hierarchical symbol support to true * add documentation and default mapping Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
This commit is contained in:
@@ -137,6 +137,12 @@ function M.document_symbol()
|
||||
request('textDocument/documentSymbol', params)
|
||||
end
|
||||
|
||||
function M.workspace_symbol(query)
|
||||
query = query or npcall(vfn.input, "Query: ")
|
||||
local params = {query = query}
|
||||
request('workspace/symbol', params)
|
||||
end
|
||||
|
||||
--- Send request to server to resolve document highlights for the
|
||||
--- current text document position. This request can be associated
|
||||
--- to key mapping or to events such as `CursorHold`, eg:
|
||||
|
||||
Reference in New Issue
Block a user