From 8ebd15a54dba474ee634e0087bb460ca6e7d8428 Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 18 May 2017 13:21:14 +0100 Subject: Add commands to run ALEFix, and some tests to cover functionality so far. Add a simple autopep8 function. --- plugin/ale.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugin') diff --git a/plugin/ale.vim b/plugin/ale.vim index 0e8c369f..28b8bebf 100644 --- a/plugin/ale.vim +++ b/plugin/ale.vim @@ -60,6 +60,9 @@ let g:ale_filetype_blacklist = ['nerdtree', 'unite', 'tags'] " This Dictionary configures which linters are enabled for which languages. let g:ale_linters = get(g:, 'ale_linters', {}) +" This Dictionary configures which functions will be used for fixing problems. +let g:ale_fixers = get(g:, 'ale_fixers', {}) + " This Dictionary allows users to set up filetype aliases for new filetypes. let g:ale_linter_aliases = get(g:, 'ale_linter_aliases', {}) @@ -276,6 +279,9 @@ command! -bar ALEInfo :call ale#debugging#Info() " The same, but copy output to your clipboard. command! -bar ALEInfoToClipboard :call ale#debugging#InfoToClipboard() +" Fix problems in files. +command! -bar ALEFix :call ale#fix#Fix() + " mappings for commands nnoremap (ale_previous) :ALEPrevious nnoremap (ale_previous_wrap) :ALEPreviousWrap @@ -284,6 +290,7 @@ nnoremap (ale_next_wrap) :ALENextWrap nnoremap (ale_toggle) :ALEToggle nnoremap (ale_lint) :ALELint nnoremap (ale_detail) :ALEDetail +nnoremap (ale_fix) :ALEFix " Housekeeping -- cgit v1.2.3 From 3530180a73ec53c6c029926173c34e0d78a8ac70 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 20 May 2017 18:56:44 +0100 Subject: Suggest functions for fixing issues for ALEFix --- plugin/ale.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugin') diff --git a/plugin/ale.vim b/plugin/ale.vim index 28b8bebf..a1a86662 100644 --- a/plugin/ale.vim +++ b/plugin/ale.vim @@ -281,6 +281,8 @@ command! -bar ALEInfoToClipboard :call ale#debugging#InfoToClipboard() " Fix problems in files. command! -bar ALEFix :call ale#fix#Fix() +" Suggest registered functions to use for fixing problems. +command! -bar ALEFixSuggest :call ale#fix#registry#Suggest(&filetype) " mappings for commands nnoremap (ale_previous) :ALEPrevious -- cgit v1.2.3