diff options
author | Christian Clason <christian.clason@uni-due.de> | 2020-05-02 17:56:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 17:56:05 +0200 |
commit | ea347b18d883999ed9a8d2e7c00068058135232f (patch) | |
tree | ca1271a72e36e45d6450f8009f9f6e668576c1f5 /runtime/lua/vim/lsp/buf.lua | |
parent | 2f42e4d0c86163e64eb56077939fe405dc434e42 (diff) | |
download | rneovim-ea347b18d883999ed9a8d2e7c00068058135232f.tar.gz rneovim-ea347b18d883999ed9a8d2e7c00068058135232f.tar.bz2 rneovim-ea347b18d883999ed9a8d2e7c00068058135232f.zip |
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>
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 587d1f52e9..0b45951a56 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -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: |