summaryrefslogtreecommitdiff
path: root/plugin/ale.vim
diff options
context:
space:
mode:
authorBen Kraft <benkraft@khanacademy.org>2018-12-12 11:35:57 -0800
committerBen Kraft <ben@benkraft.org>2018-12-19 18:35:56 -0500
commit73a204dd006c1ad1d7562e5970dbb41975b94727 (patch)
tree6b08b89311db2c570faad18401372425f6ee5c5f /plugin/ale.vim
parent2cfa09e02d65cd06649fb1ae5f988b7a110a124d (diff)
downloadale-73a204dd006c1ad1d7562e5970dbb41975b94727.zip
Add versions of ALEGoToDefinition that open in splits
This is just like `:ALEGoToDefinitionInTab`, only a (v)split instead of a tab. Fixes #2140.
Diffstat (limited to 'plugin/ale.vim')
-rw-r--r--plugin/ale.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 610ff142..f57a495c 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -188,7 +188,9 @@ command! -bar ALEFixSuggest :call ale#fix#registry#Suggest(&filetype)
" Go to definition for tsserver and LSP
command! -bar ALEGoToDefinition :call ale#definition#GoTo({})
-command! -bar ALEGoToDefinitionInTab :call ale#definition#GoTo({'open_in_tab': 1})
+command! -bar ALEGoToDefinitionInTab :call ale#definition#GoTo({'open_in': 'tab'})
+command! -bar ALEGoToDefinitionInSplit :call ale#definition#GoTo({'open_in': 'horizontal-split'})
+command! -bar ALEGoToDefinitionInVSplit :call ale#definition#GoTo({'open_in': 'vertical-split'})
" Find references for tsserver and LSP
command! -bar ALEFindReferences :call ale#references#Find()
@@ -222,6 +224,8 @@ 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_go_to_definition_in_split) :ALEGoToDefinitionInSplit<Return>
+nnoremap <silent> <Plug>(ale_go_to_definition_in_vsplit) :ALEGoToDefinitionInVSplit<Return>
nnoremap <silent> <Plug>(ale_find_references) :ALEFindReferences<Return>
nnoremap <silent> <Plug>(ale_hover) :ALEHover<Return>
nnoremap <silent> <Plug>(ale_documentation) :ALEDocumentation<Return>