summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-22 19:49:24 +0100
committerw0rp <devw0rp@gmail.com>2018-04-22 19:49:30 +0100
commit286abd12d3adf3fdb3ed90a71b9dd8e8af4bf841 (patch)
tree07f032fb2e48d6054eb933bc4261d4bcea7950f0 /plugin
parent5a365e792693373413984a7eae2d64f7d92c1238 (diff)
downloadale-286abd12d3adf3fdb3ed90a71b9dd8e8af4bf841.zip
Add support for finding references using LSP servers or tsserver
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 3f157bc0..f51e175b 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -271,6 +271,9 @@ command! -bar ALEFixSuggest :call ale#fix#registry#Suggest(&filetype)
command! -bar ALEGoToDefinition :call ale#definition#GoTo({})
command! -bar ALEGoToDefinitionInTab :call ale#definition#GoTo({'open_in_tab': 1})
+" Find references for tsserver and LSP
+command! -bar ALEFindReferences :call ale#references#Find()
+
" <Plug> mappings for commands
nnoremap <silent> <Plug>(ale_previous) :ALEPrevious<Return>
nnoremap <silent> <Plug>(ale_previous_wrap) :ALEPreviousWrap<Return>
@@ -291,6 +294,7 @@ nnoremap <silent> <Plug>(ale_detail) :ALEDetail<Return>
nnoremap <silent> <Plug>(ale_fix) :ALEFix<Return>
nnoremap <silent> <Plug>(ale_go_to_definition) :ALEGoToDefinition<Return>
nnoremap <silent> <Plug>(ale_go_to_definition_in_tab) :ALEGoToDefinitionInTab<Return>
+nnoremap <silent> <Plug>(ale_find_references) :ALEFindReferences<Return>
" Set up autocmd groups now.
call ale#toggle#InitAuGroups()