2024-03-04 14:39:06 -05:00
|
|
|
"always disable ale in diff mode
|
|
|
|
if &diff
|
2018-03-13 11:32:04 -04:00
|
|
|
let g:autostartchecker = 0
|
|
|
|
endif
|
|
|
|
|
2018-03-13 22:50:50 -04:00
|
|
|
"start ale if autostartchecker is true
|
2018-03-13 11:32:04 -04:00
|
|
|
let g:ale_enabled = g:autostartchecker
|
|
|
|
|
2018-03-13 22:50:50 -04:00
|
|
|
"always show the sign column when ale is running
|
|
|
|
if g:autostartchecker
|
|
|
|
set scl=yes
|
|
|
|
else
|
|
|
|
set scl=auto
|
|
|
|
endif
|
2018-03-13 11:32:04 -04:00
|
|
|
|
2018-03-13 22:50:50 -04:00
|
|
|
"don't open the error list when detected (hitting leader twice will do this)
|
|
|
|
let g:ale_open_list = 0
|
2018-03-13 11:35:21 -04:00
|
|
|
|
2018-03-13 22:50:50 -04:00
|
|
|
"don't fix on save
|
2018-03-13 11:32:04 -04:00
|
|
|
let g:ale_fix_on_save = 0
|
|
|
|
|
2018-03-13 22:50:50 -04:00
|
|
|
"configure when to lint
|
2018-03-13 11:40:42 -04:00
|
|
|
let g:ale_lint_on_text_changed = 'normal'
|
|
|
|
let g:ale_lint_on_enter = 1
|
2018-03-13 11:46:26 -04:00
|
|
|
let g:ale_lint_on_filetype_changed = 1
|
2018-03-13 11:40:42 -04:00
|
|
|
let g:ale_lint_on_save = 1
|
|
|
|
let g:ale_lint_on_insert_leave = 1
|
|
|
|
|
2021-06-17 13:19:35 -04:00
|
|
|
"show which linter is complaining
|
|
|
|
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
|
|
|
|
|
2023-03-30 21:24:40 -04:00
|
|
|
"specified ale fixers
|
2018-03-13 11:32:04 -04:00
|
|
|
let g:ale_fixers = {
|
2018-03-16 14:29:21 -04:00
|
|
|
\ 'javascript': [ 'eslint' ],
|
|
|
|
\ 'vue': [ 'eslint' ]
|
2018-03-13 11:32:04 -04:00
|
|
|
\ }
|
|
|
|
|
2023-03-30 21:24:40 -04:00
|
|
|
"specified ale linters
|
|
|
|
let g:ale_linters = {
|
|
|
|
\ 'javascript': [ 'eslint' ],
|
|
|
|
\ 'vue': [ 'eslint' ]
|
|
|
|
\ }
|
|
|
|
|
2018-03-13 22:50:50 -04:00
|
|
|
"don't run ale on minified files
|
2018-03-13 11:32:04 -04:00
|
|
|
let g:ale_pattern_options = {
|
|
|
|
\ '\.min\.[^\.]*$': { 'ale_linters': [], 'ale_fixers': [] },
|
|
|
|
\ }
|