Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commit 8ee20ec introduces a conflict with rustaceanvim #4938

Open
dlyongemallo opened this issue Mar 29, 2025 · 1 comment
Open

commit 8ee20ec introduces a conflict with rustaceanvim #4938

dlyongemallo opened this issue Mar 29, 2025 · 1 comment
Assignees
Labels
Milestone

Comments

@dlyongemallo
Copy link

Information

VIM version

NVIM v0.10.4
Build type: Release

Operating System: Ubuntu 24.04.2 LTS, MacOS 15.3.2 (reproduces on both)

What went wrong

Commit 8ee20ec changes the way LSPs are set up. For Rust, rustaceanvim requires special handling (see the warning here). This commit conflicts with rustaceanvim and causes the rust-analyzer to be loaded twice, resulting in errors such other plugins being unable to attach to the LSP on Rust files. (The immediately prior commit, f3512cd, does not exhibit this behaviour.)

Reproducing the bug

  1. Install ale (at a commit prior to 8ee20ec).
  2. Install and set up rustaceanvim.
  3. Install other Rust plugins.
  4. Open a Rust source file. Observe that everything works correctly.
  5. Update ale (past commit 8ee20ec).
  6. Open a Rust source file. Observe that Rust plugins are broken due to rust-analyzer being loaded twice.

:ALEInfo

Expand Current Filetype: Available Linters: [] Enabled Linters: [] Ignored Linters: [] Suggested Fixers: '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.

Global Variables:
" Press Space to read :help for a setting
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 = 'auto'
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 = {}
let g:ale_history_enabled = 1
let g:ale_info_default_mode = 'preview'
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 = {}
let g:ale_linters = {}
let g:ale_linters_explicit = 0
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_max_buffer_history_size = v:null
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 = {'.*.java$': {'ale_enabled': 0}}
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
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 = v:null
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_type_map = v:null
let g:ale_use_neovim_diagnostics_api = 1
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 'all'
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1

Command History:

@w0rp
Copy link
Member

w0rp commented Mar 29, 2025

Thank you for reporting this issue. This is the first time I've seen that plugin. I set the value of the ale_disable_lsp to 'auto' previously and there's already support for turning off ALE language servers if nvim-lspconfig language servers are configured by default. What I can do is for rust analyzer specifically check if the setting is 'auto' and look to see if rustaceanvim is configured so it doesn't conflict by default.

In the meantime you can prevent conflicts by setting disable_lsp to true or 1 in your Rust ftplugin file. With the new Neovim Lua setup functions you can do this in ftplugin/rust.lua like so.

require("ale").setup.buffer({
    disable_lsp = true,
})

@w0rp w0rp added this to the Version 5.0.0 milestone Mar 29, 2025
@w0rp w0rp self-assigned this Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants