diff options
author | Andrey Popp <8mayday@gmail.com> | 2019-01-22 02:06:28 +0300 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2019-01-21 23:06:28 +0000 |
commit | d0284f22ea45a5e7796da2224373c22232af1777 (patch) | |
tree | cdb86bbb13a5d0c11f6579aeebe4deaed75e32ab /test/lsp | |
parent | a4932679b5c0d2917a399614a25c9827d63eecb1 (diff) | |
download | ale-d0284f22ea45a5e7796da2224373c22232af1777.zip |
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
Diffstat (limited to 'test/lsp')
-rw-r--r-- | test/lsp/test_lsp_client_messages.vader | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lsp/test_lsp_client_messages.vader b/test/lsp/test_lsp_client_messages.vader index 91efb41b..bdede460 100644 --- a/test/lsp/test_lsp_client_messages.vader +++ b/test/lsp/test_lsp_client_messages.vader @@ -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 \ [ |