mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-28 20:42:26 +08:00
Add textDocument/typeDefinition for LSP (#2226)
* Add textDocument/typeDefinition for LSP Doc to spec https://microsoft.github.io/language-server-protocol/specification#textDocument_typeDefinition This works like textDocument/definition but resolves a location of a type of an expression under the cursor. I'm not sure what to do with tsserver though. * Fix passing column to LSP * test_go_to_definition: wording * Add tests for textDocument/typeDefinition * Add docs for textDocument/typeDefinition
This commit is contained in:
@@ -43,6 +43,7 @@ function! ale#lsp#Register(executable_or_address, project, init_options) abort
|
||||
\ 'completion': 0,
|
||||
\ 'completion_trigger_characters': [],
|
||||
\ 'definition': 0,
|
||||
\ 'typeDefinition': 0,
|
||||
\ 'symbol_search': 0,
|
||||
\ },
|
||||
\}
|
||||
@@ -207,6 +208,10 @@ function! s:UpdateCapabilities(conn, capabilities) abort
|
||||
let a:conn.capabilities.definition = 1
|
||||
endif
|
||||
|
||||
if get(a:capabilities, 'typeDefinitionProvider') is v:true
|
||||
let a:conn.capabilities.typeDefinition = 1
|
||||
endif
|
||||
|
||||
if get(a:capabilities, 'workspaceSymbolProvider') is v:true
|
||||
let a:conn.capabilities.symbol_search = 1
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user