summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorJerko Steiner <jerko.steiner@gmail.com>2019-09-13 03:53:23 +0700
committerw0rp <w0rp@users.noreply.github.com>2019-09-12 21:53:23 +0100
commit3e8c8d3ccbead8a6540b782686ab3751361a4ec1 (patch)
tree464f0eb87327ec02dd7818074ac8eed5c71f83d5 /plugin
parentb66d202c1dfc1354d09f8d5eacef54404e9b2c57 (diff)
downloadale-3e8c8d3ccbead8a6540b782686ab3751361a4ec1.zip
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.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale.vim7
1 files changed, 7 insertions, 0 deletions
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(<q-args>)
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()
+
" <Plug> mappings for commands
nnoremap <silent> <Plug>(ale_previous) :ALEPrevious<Return>
nnoremap <silent> <Plug>(ale_previous_wrap) :ALEPreviousWrap<Return>
@@ -259,6 +265,7 @@ nnoremap <silent> <Plug>(ale_find_references) :ALEFindReferences<Return>
nnoremap <silent> <Plug>(ale_hover) :ALEHover<Return>
nnoremap <silent> <Plug>(ale_documentation) :ALEDocumentation<Return>
inoremap <silent> <Plug>(ale_complete) <C-\><C-O>:ALEComplete<Return>
+nnoremap <silent> <Plug>(ale_rename) :ALERename<Return>
" Set up autocmd groups now.
call ale#events#Init()