I'm using vim with w0rp/ale (aka dense-analysis/ale) and have been for several years. It suddenly stopped working and I can't figure out why. It will neither lint nor fix.
ALEInfo shows what appear to be normal values, but there are no commands in the Command History.
If I run the command eslint -f unix --stdin --stdin-filename src/App.js < src/App.js I get back the expected eslint errors (two of them).
(Updated) NOTE, however, that ALECodeAction returns No active LSPs
I've tried removing my .eslintrc.json in case it has errors (no luck) and tried simplifying / trying new combinations of g:ale_linters in case that was the issue, but no love there either.
Any suggestions for some trouble-shooting approaches?
Here's the various configurations I've tried in my .vimrc:
let g:ale_linters_explicit = 1
let g:ale_linter_aliases = {'jsx': ['css', 'javascript']}
let g:ale_sign_column_always = 1
" extended logging
let g:ale_history_log_output = 1
let g:ale_history_enabled = 1
" new fixers & linters 2021-01-15
" let g:ale_fixers = {'javascript': ['xo'], "json": ['prettier']}
" let g:ale_linters = {'javascript': ['xo', 'prettier', 'eslint']}
" ole fixers & linters working until prettier install/Grant
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['eslint'],
\}
" " Only run linters named in ale_linters settings.
let g:ale_linters = {
\ 'javascript': ['stylelint', 'eslint'],
\ 'jsx': ['stylelint', 'eslint'],
\ 'javascript.jsx': ['stylelint', 'eslint'],
\ 'bash': ['sh'],
\}
Here's the ALEInfo (updated):
Current Filetype: javascript.jsx
Available Linters: ['eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo', 'csslint', 'fecs', 'stylelint', 'eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo']
Enabled Linters: ['stylelint', 'eslint']
Ignored Linters: []
Suggested Fixers:
'eslint' - Apply eslint --fix to a file.
'fecs' - Apply fecs format to a file.
'importjs' - automatic imports for javascript
'prettier' - Apply prettier to a file.
'prettier_eslint', 'prettier-eslint' - Apply prettier-eslint to a file.
'prettier_standard', 'prettier-standard' - Apply prettier-standard to a file.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'standard' - Fix JavaScript files using standard --fix
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
'xo' - Fix JavaScript/TypeScript files using xo --fix.
Linter Variables:
Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = v:null
let g:ale_command_wrapper = v:null
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_disable_lsp = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = v:null
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {'*': ['remove_trailing_lines', 'trim_whitespace'], 'javascript': ['eslint']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = v:null
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {'jsx': ['css', 'javascript']}
let g:ale_linters = {'jsx': ['stylelint', 'eslint'], 'javascript.jsx': ['stylelint', 'eslint'], 'bash': ['sh'], 'javascript': ['stylelint', 'eslint']}
let g:ale_linters_explicit = 1
let g:ale_linters_ignore = {}
let g:ale_list_vertical = v:null
let g:ale_list_window_size = v:null
let g:ale_loclist_msg_format = v:null
let g:ale_lsp_root = {}
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = v:null
let g:ale_maximum_file_size = v:null
let g:ale_open_list = v:null
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
let g:ale_sign_error = v:null
let g:ale_sign_info = v:null
let g:ale_sign_offset = v:null
let g:ale_sign_style_error = v:null
let g:ale_sign_style_warning = v:null
let g:ale_sign_warning = v:null
let g:ale_sign_highlight_linenrs = v:null
let g:ale_statusline_format = v:null
let g:ale_type_map = v:null
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History: