diff options
author | D. Ben Knoble <ben.knoble+github@gmail.com> | 2020-11-30 13:42:21 -0500 |
---|---|---|
committer | D. Ben Knoble <ben.knoble+github@gmail.com> | 2020-11-30 13:42:21 -0500 |
commit | 7e12be0c643857221fb0772ffceba9ff4cd66cc9 (patch) | |
tree | 2db8c638bc9e8d1c68e1751a48888918e4bd9e4e /plugin/ale.vim | |
parent | 47da7483d8d4bbbe4022b9c0821d3a7d2d0afaaf (diff) | |
parent | 03b6978a270107b670b0363d50f3eed4b365ba26 (diff) | |
download | ale-7e12be0c643857221fb0772ffceba9ff4cd66cc9.zip |
Merge remote-tracking branch 'origin/master' into fix-swipl
* origin/master: (40 commits)
fix: correct suggested filetype for yamlfix
feat: add yamlfix fixer
Use _config for LSP config options
Add support for R languageserver (#3370)
Fix 3103 - add shellcheck shell directive detection. (#3216)
Added the Vundle command in installation instructions (#3400)
Adds support for Tlint - A Tighten Opinionated PHP Linter (#3291)
Add php phpcbf options (#3383)
Use has('gui_running') instead of has('gui')
Close #2727 - Add a hover-only setting for balloons
Fix #3332 - Modify everything for rename/actions
Add a missing blank line in documentation
Add luafmt fixer (#3289)
#3442 Fix code fix clangd issue
Close #1466 - Add GVIM refactor menu support
Look for node packages in .yarn/sdks as well
Update documentation for code actions and rename
cmp forwards, and reverse the code actions
Support for LSP/tsserver Code Actions (#3437)
Move the test for buffer-local variables
...
Diffstat (limited to 'plugin/ale.vim')
-rw-r--r-- | plugin/ale.vim | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim index 18d867ee..5b7be116 100644 --- a/plugin/ale.vim +++ b/plugin/ale.vim @@ -158,7 +158,10 @@ let g:ale_python_auto_pipenv = get(g:, 'ale_python_auto_pipenv', 0) " This variable can be overridden to set the GO111MODULE environment variable. let g:ale_go_go111module = get(g:, 'ale_go_go111module', '') -if g:ale_set_balloons +" If 1, enable a popup menu for commands. +let g:ale_popup_menu_enabled = get(g:, 'ale_popup_menu_enabled', has('gui_running')) + +if g:ale_set_balloons is 1 || g:ale_set_balloons is# 'hover' call ale#balloon#Enable() endif @@ -166,6 +169,10 @@ if g:ale_completion_enabled call ale#completion#Enable() endif +if g:ale_popup_menu_enabled + call ale#code_action#EnablePopUpMenu() +endif + " Define commands for moving through warnings and errors. command! -bar -nargs=* ALEPrevious \ :call ale#loclist_jumping#WrapJump('before', <q-args>) @@ -238,7 +245,10 @@ command! -bar ALEComplete :call ale#completion#GetCompletions('ale-manual') command! -bar ALEImport :call ale#completion#Import() " Rename symbols using tsserver and LSP -command! -bar ALERename :call ale#rename#Execute() +command! -bar -bang ALERename :call ale#rename#Execute() + +" Apply code actions to a range. +command! -bar -range ALECodeAction :call ale#codefix#Execute(<range>) " Organize import statements using tsserver command! -bar ALEOrganizeImports :call ale#organize_imports#Execute() @@ -283,6 +293,7 @@ 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_code_action) :ALECodeAction<Return> nnoremap <silent> <Plug>(ale_repeat_selection) :ALERepeatSelection<Return> " Set up autocmd groups now. |