mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-16 01:07:06 +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:
@@ -146,6 +146,20 @@ Execute(ale#lsp#message#Definition() should return correct messages):
|
||||
\ ],
|
||||
\ ale#lsp#message#Definition(bufnr(''), 12, 34)
|
||||
|
||||
Execute(ale#lsp#message#TypeDefinition() should return correct messages):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ 0,
|
||||
\ 'textDocument/typeDefinition',
|
||||
\ {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
|
||||
\ },
|
||||
\ 'position': {'line': 11, 'character': 33},
|
||||
\ }
|
||||
\ ],
|
||||
\ ale#lsp#message#TypeDefinition(bufnr(''), 12, 34)
|
||||
|
||||
Execute(ale#lsp#message#References() should return correct messages):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
||||
Reference in New Issue
Block a user