ale
ale copied to clipboard
LSP linters ignore ale_linters configuration
Information
vim 8.2 and neovim 0.7
Operating System:
What went wrong
LSP linters seem to ignore g:ale_linters configuration.
Reproducing the bug
- Install and configure two language servers (e.g. eclipselsp and javalsp for java files). Ensure both linters work properly.
- Configure g:ale_linters with only one of the language servers (e.g. eclipselsp).
- Edit a java file.
- Inspect ALEInfo and see that ALE starts both language servers instead of the one set in g:ale_linters.
:ALEInfo
Current Filetype: java
Available Linters: ['android', 'checkstyle', 'cspell', 'eclipselsp', 'javac', 'javalsp', 'pmd']
Enabled Linters: ['eclipselsp']
Ignored Linters: []
Suggested Fixers:
'google_java_format' - Fix Java files with google-java-format.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
'uncrustify' - Fix C, C++, C#, ObjectiveC, ObjectiveC++, D, Java, Pawn, and VALA files with uncrustify.
Linter Variables:
let g:ale_java_eclipselsp_config_path = ''
let g:ale_java_eclipselsp_executable = 'java'
let g:ale_java_eclipselsp_javaagent = ''
let g:ale_java_eclipselsp_path = '/home/ryujin/Apps/eclipse.jdt.ls'
let g:ale_java_eclipselsp_workspace_path = ''
Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = 50
let g:ale_disable_lsp = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = ''
let g:ale_echo_msg_format = '%severity% [%linter%] (%code%) - %s'
let g:ale_echo_msg_info_str = ''
let g:ale_echo_msg_warning_str = ''
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {'bib': ['bibclean'], 'openapi': ['prettier'], 'kotlin': ['ktlint'], '*': ['remove_trailing_lines', 'trim_
whitespace'], 'yaml': ['prettier'], 'ruby': ['rubocop'], 'python': ['yapf']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
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 = {'asciidoctor': 'asciidoc'}
let g:ale_linters = {'rust': ['analyzer'], 'javascript': ['eslint'], 'asciidoc': [], 'text': ['proselint', 'write-good'], 'la
tex': ['proselint', 'chktex', 'lacheck'], 'kotlin': ['ktlint', 'languageserver'], 'go': ['gofmt', 'golint', 'go vet', 'golang
server'], 'markdown': ['markdownlint'], 'vue': ['vls'], 'terraform': ['checkov', 'terraform', 'tflint', 'terraform_ls'], 'yam
l': ['yamllint', 'yaml-language-server'], 'python': ['flake8', 'pylint', 'jedils'], 'tex': ['proselint', 'chktex', 'lacheck']
, 'vim': ['vimls', 'vint', 'ale_custom_linting_rules'], 'bib': ['bibclean'], 'c': ['clangd'], 'plaintex': ['proselint', 'chkt
ex', 'lacheck'], 'ansible': ['ansible-lint'], 'mail': ['proselint', 'write-good'], 'xml': ['android'], 'help': [], 'openapi':
['yamllint', 'ibm-validator'], 'groovy': ['android'], 'dockerfile': ['dockerfile_lint'], 'ruby': ['solargraph', 'rubocop', '
ruby'], 'java': ['eclipselsp']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%severity% [%linter%] (%code%) - %s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = {'.gitlab-ci\.yml$': {'ale_linters': ['gitlablint', 'yamllint']}}
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {'metals': function('MyFindMetalRoot')}
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 = ''
let g:ale_sign_info = ''
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = ''
let g:ale_sign_style_warning = ''
let g:ale_sign_warning = ''
let g:ale_sign_highlight_linenrs = 0
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 1
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(executable check - success) java
(finished - exit code 0) ['/bin/bash', '-c', '''java'' -version']
<<<OUTPUT STARTS>>>
openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment Corretto-17.0.4.8.1 (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.4.8.1 (build 17.0.4+8-LTS, mixed mode, sharing)
<<<OUTPUT ENDS>>>
(executable check - success) /home/ryujin/Apps/java-language-server/dist/lang_server_linux.sh
(started) ['/bin/bash', '-c', '''/home/ryujin/Apps/java-language-server/dist/lang_server_linux.sh''']
(started) ['/bin/bash', '-c', '''java'' -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4
-Declipse.product=org.eclipse.jdt.ls.core.product -Dlog.level=ALL -noverify -Xmx1G -jar ''/home/ryujin/Apps/eclipse.jdt.ls/o
rg.eclipse.jdt.ls.product/target/products/languageServer.product/linux/gtk/x86_64/plugins/org.eclipse.equinox.launcher_1.6.40
0.v20210924-0641.jar'' -configuration ''/home/ryujin/Apps/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/products/languageS
erver.product/linux/gtk/x86_64/config_linux'' -data ''/home/ryujin/Projects/HelloWorld'' --add-modules=ALL-SYSTEM --add-opens
java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED']
See that only eclipselsp is enabled:
Enabled Linters: ['eclipselsp']
Still both eclipselsp and javalsp are started:
/// javalsp start command
(started) ['/bin/bash', '-c', '''/home/ryujin/Apps/java-language-server/dist/lang_server_linux.sh''']
/// eclipselsp start command
(started) ['/bin/bash', '-c', '''java'' -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4
-Declipse.product=org.eclipse.jdt.ls.core.product -Dlog.level=ALL -noverify -Xmx1G -jar ''/home/ryujin/Apps/eclipse.jdt.ls/o
rg.eclipse.jdt.ls.product/target/products/languageServer.product/linux/gtk/x86_64/plugins/org.eclipse.equinox.launcher_1.6.40
0.v20210924-0641.jar'' -configuration ''/home/ryujin/Apps/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/products/languageS
erver.product/linux/gtk/x86_64/config_linux'' -data ''/home/ryujin/Projects/HelloWorld'' --add-modules=ALL-SYSTEM --add-opens
java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED']