You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 15 2021 08:22:17)
macOS version - x86_64
Operating System: macOS Catalina
What went wrong
When I add code to a Rust file that adds a warning or an error, the warning/error never shows up. Any warnings or errors present when the file was opened never go away regardless of any changes I save.
Reproducing the bug
Setup ALE to use rust-analyzer
create an empty project with cargo new --bin foobar
cd foobar
vim src/main.rs
Wait until the rust-analyzer process drops to single digit percentage CPU usage
Add a line let x = 3; below the fn main line
Wait a second.
Observe no warning about an unused variable x (a warning is expected here).
:ALEInfo
Current Filetype: rust
Available Linters: ['analyzer', 'cargo', 'rls', 'rustc']
Enabled Linters: ['analyzer']
Ignored Linters: []
Suggested Fixers:
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'rustfmt' - Fix Rust files with Rustfmt.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
Linter Variables:
let g:ale_rust_analyzer_config = {}
let g:ale_rust_analyzer_executable = 'rust-analyzer'
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 = 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 = 'E'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {}
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 = {}
let g:ale_linters = {'go': ['gofmt', 'golangci-lint', 'gopls', 'govet'], 'rust': ['analyzer']}
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 = '[%linter%] %s [%severity%]'
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 = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
let g:ale_set_balloons = 1
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 = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(executable check - success) rust-analyzer
(started) ['/usr/local/bin/bash', '-c', '''rust-analyzer''']
Cause
After bisecting, I found that this is the commit that broke this functionality:
c7e3f1a0dd447eeafcbbd158974860c1918dbdd5 is the first bad commit
commit c7e3f1a0dd447eeafcbbd158974860c1918dbdd5
Author: Horacio Sanson <hsanson@gmail.com>
Date: Fri Oct 15 08:42:07 2021 +0900
Fix 3207 - do not send didSave notification if not supported (#3930)
autoload/ale/lsp.vim | 19 ++++++++++++-------
autoload/ale/lsp_linter.vim | 1 +
test/lsp/test_did_save_event.vader | 24 ++++++++++++++++++++++++
3 files changed, 37 insertions(+), 7 deletions(-)
The text was updated successfully, but these errors were encountered:
This happens on Linux and OpenBSD as well, and doesn't seem to depend on the rust-analyzer version. I reproed it on macOS with this version though:
❯ rust-analyzer --version
rust-analyzer b641a6607 2021-08-17 dev
The commit message suggests it might be a bug in rust-analyzer though? I am happy to create an issue for that project if you all think that is appropriate.
@AaronM04 thanks for the report and for tracking the commit that caused the issue. This helped me unveil a silly mistake I made on that commit. I merged a fix so let me know if things are working back again for you.
Information
VIM version
Operating System: macOS Catalina
What went wrong
When I add code to a Rust file that adds a warning or an error, the warning/error never shows up. Any warnings or errors present when the file was opened never go away regardless of any changes I save.
Reproducing the bug
cargo new --bin foobar
cd foobar
vim src/main.rs
let x = 3;
below thefn main
linex
(a warning is expected here).:ALEInfo
Cause
After bisecting, I found that this is the commit that broke this functionality:
The text was updated successfully, but these errors were encountered: