diff options
author | w0rp <devw0rp@gmail.com> | 2020-09-06 22:37:37 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-09-06 22:37:37 +0100 |
commit | c36053d4cc28fbc5fc0ee70ccb2c9a1b349eaaa3 (patch) | |
tree | 88d99ac08c11166e9849d869351374005f615465 /plugin | |
parent | 5bc49d204782617e01da65d83c0d9700a1b0a72f (diff) | |
download | ale-c36053d4cc28fbc5fc0ee70ccb2c9a1b349eaaa3.zip |
Close #3268 - Implement :ALEImport
A new command, `:ALEImport`, has been added, which lets you import words
at your cursor if a completion provider can provide a completion for
that word which includes some additional text changes.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/ale.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim index 6a947ea7..9cebb71f 100644 --- a/plugin/ale.vim +++ b/plugin/ale.vim @@ -229,8 +229,12 @@ command! -bar ALEDocumentation :call ale#hover#ShowDocumentationAtCursor() " Search for appearances of a symbol, such as a type name or function name. command! -nargs=1 ALESymbolSearch :call ale#symbol#Search(<q-args>) +" Complete text with tsserver and LSP command! -bar ALEComplete :call ale#completion#GetCompletions('ale-manual') +" Try to find completions for the current symbol that add additional text. +command! -bar ALEImport :call ale#completion#Import() + " Rename symbols using tsserver and LSP command! -bar ALERename :call ale#rename#Execute() @@ -275,6 +279,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_import) :ALEImport<Return> nnoremap <silent> <Plug>(ale_rename) :ALERename<Return> nnoremap <silent> <Plug>(ale_repeat_selection) :ALERepeatSelection<Return> |