mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Add ALEGoToImplementation (#4160)
* Add go to implementation * Add test cases for GoToImplementation * Add documentation for GoToImplementation
This commit is contained in:
@@ -175,6 +175,20 @@ Execute(ale#lsp#message#TypeDefinition() should return correct messages):
|
||||
\ ],
|
||||
\ ale#lsp#message#TypeDefinition(bufnr(''), 12, 34)
|
||||
|
||||
Execute(ale#lsp#message#Implementation() should return correct messages):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ 0,
|
||||
\ 'textDocument/implementation',
|
||||
\ {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
|
||||
\ },
|
||||
\ 'position': {'line': 11, 'character': 33},
|
||||
\ }
|
||||
\ ],
|
||||
\ ale#lsp#message#Implementation(bufnr(''), 12, 34)
|
||||
|
||||
Execute(ale#lsp#message#References() should return correct messages):
|
||||
AssertEqual
|
||||
\ [
|
||||
@@ -335,6 +349,19 @@ Execute(ale#lsp#tsserver_message#TypeDefinition() should return correct messages
|
||||
\ ],
|
||||
\ ale#lsp#tsserver_message#TypeDefinition(bufnr(''), 347, 12)
|
||||
|
||||
Execute(ale#lsp#tsserver_message#Implementation() should return correct messages):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ 0,
|
||||
\ 'ts@implementation',
|
||||
\ {
|
||||
\ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'),
|
||||
\ 'line': 347,
|
||||
\ 'offset': 12,
|
||||
\ }
|
||||
\ ],
|
||||
\ ale#lsp#tsserver_message#Implementation(bufnr(''), 347, 12)
|
||||
|
||||
Execute(ale#lsp#tsserver_message#References() should return correct messages):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
||||
@@ -189,6 +189,10 @@ Before:
|
||||
\ 'typeDefinition': {
|
||||
\ 'dynamicRegistration': v:false,
|
||||
\ },
|
||||
\ 'implementation': {
|
||||
\ 'dynamicRegistration': v:false,
|
||||
\ 'linkSupport': v:false,
|
||||
\ },
|
||||
\ 'publishDiagnostics': {
|
||||
\ 'relatedInformation': v:true,
|
||||
\ },
|
||||
|
||||
@@ -182,6 +182,7 @@ Execute(Capabilities should be enabled when send as Dictionaries):
|
||||
\ },
|
||||
\ 'definitionProvider': {},
|
||||
\ 'typeDefinitionProvider': {},
|
||||
\ 'implementationProvider': {},
|
||||
\ 'experimental': {},
|
||||
\ 'documentHighlightProvider': v:true,
|
||||
\ 'workspaceSymbolProvider': {}
|
||||
@@ -198,6 +199,7 @@ Execute(Capabilities should be enabled when send as Dictionaries):
|
||||
\ 'hover': 1,
|
||||
\ 'definition': 1,
|
||||
\ 'typeDefinition': 1,
|
||||
\ 'implementation': 1,
|
||||
\ 'symbol_search': 1,
|
||||
\ 'rename': 1,
|
||||
\ 'code_actions': 1,
|
||||
|
||||
Reference in New Issue
Block a user