Skip to content

ALE fails to lint - says "No active LSPs" #3542

@JESii

Description

@JESii

Information

VIM version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 6 2020 16:07:31)
macOS version
Operating System:
MacOS Cataling 10.15.7 (19H2)

What went wrong

I've been using ALE for several years now and love it. Recently something broke and now ALE doesn't work in my code.

  1. No errors of any kind are displayed for my code
  2. ALEInfo shows no command history (see below)
  3. ALECodeAction shows No active LSPs
  4. Running npx eslint -f unix --stdin --stdin-filename src/App.js < src/App.js produces the expected output:
/Users/jseidel/ppg/formeLife/trainer-web-app/src/App.js:8:10: 'useAuth0' is defined but never used. [Error/no-unused-vars]
/Users/jseidel/ppg/formeLife/trainer-web-app/src/App.js:43:40: 'isAuthenticated' is not defined. [Error/no-undef]
/Users/jseidel/ppg/formeLife/trainer-web-app/src/App.js:45:7: 'isLoading' is not defined. [Error/no-undef]
  1. npx eslint --version shows V7.14.0
  2. npx stylelint --version shows 13.8.0.
  3. I use javascript.jsx as the filetype for both .js and .jsx files
  autocmd BufNewFile,BufRead *.jsx set filetype=javascript.jsx
  autocmd BufNewFile,BufRead *.js set filetype=javascript.jsx

I've tried :set ft=javascript but that doesn't fix the problem

Reproducing the bug

This happens with any javascript file that I edit.

:ALEInfo

 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:

NOTE: No command history

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions