From 3e8c8d3ccbead8a6540b782686ab3751361a4ec1 Mon Sep 17 00:00:00 2001 From: Jerko Steiner Date: Fri, 13 Sep 2019 03:53:23 +0700 Subject: Add ALERename (tsserver & LSP), ALEOrganizeImports (tsserver) and auto import support (tsserver) (#2709) This commit adds support for renaming symbols in tsserver and with LSP tools, and for organising imports with tsserver. Completion results for symbols that can be imported are now suggested if enabled for tsserver completion done via ALE. --- plugin/ale.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugin') diff --git a/plugin/ale.vim b/plugin/ale.vim index 6262a7c4..1912a9c0 100644 --- a/plugin/ale.vim +++ b/plugin/ale.vim @@ -221,6 +221,12 @@ command! -nargs=1 ALESymbolSearch :call ale#symbol#Search() command! -bar ALEComplete :call ale#completion#GetCompletions('ale-manual') +" Rename symbols using tsserver and LSP +command! -bar ALERename :call ale#rename#Execute() + +" Organize import statements using tsserver +command! -bar ALEOrganizeImports :call ale#organize_imports#Execute() + " mappings for commands nnoremap (ale_previous) :ALEPrevious nnoremap (ale_previous_wrap) :ALEPreviousWrap @@ -259,6 +265,7 @@ nnoremap (ale_find_references) :ALEFindReferences nnoremap (ale_hover) :ALEHover nnoremap (ale_documentation) :ALEDocumentation inoremap (ale_complete) :ALEComplete +nnoremap (ale_rename) :ALERename " Set up autocmd groups now. call ale#events#Init() -- cgit v1.2.3