mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-12 13:11:49 +08:00
Add support for finding references using LSP servers or tsserver
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user