Add support for finding references using LSP servers or tsserver

This commit is contained in:
w0rp
2018-04-22 19:49:24 +01:00
parent 5a365e7926
commit 286abd12d3
8 changed files with 438 additions and 0 deletions

View File

@@ -116,3 +116,13 @@ function! ale#lsp#message#Definition(buffer, line, column) abort
\ 'position': {'line': a:line - 1, 'character': a:column},
\}]
endfunction
function! ale#lsp#message#References(buffer, line, column) abort
return [0, 'textDocument/references', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ },
\ 'position': {'line': a:line - 1, 'character': a:column},
\ 'context': {'includeDeclaration': v:false},
\}]
endfunction