Skip to content

odd output with vim 9 and ALE... #15726

Open
@busticated

Description

hey there 👋

i'm not sure where to post this so apologies in advance if this is the wrong place. i'm seeing rather odd behavior using macvim (MacVim r178 (Vim 9.0.1897)) on macos ventura (13.5.2 (22G91)). here's an example:

Screenshot 2023-10-07 at 3 46 46 PM

it seems to be somehow related to using splits - things appear fine until you open a split at which point certain panels end up in this funky state where the gutter displays repeated @ symbols, the source code is hidden, and line numbers are not available. i think it only impacts code / panels where there are errors / warnings. in the screenshot above, you can see there are "unused" warnings on a few lines. it's easily reproducible.

i've narrowed it down to rust-analyzer - if i disable the linter using ALE's let g:ale_linters = {'rust': []}, the issue no longer happens. if i reenable the linter with let g:ale_linters = {'rust': ['analyzer']} as described here, the issue comes back. my ALE settings are otherwise, fairly stock:

let g:ale_fix_on_save = 0
let g:ale_linters = {'rust': ['analyzer']}
let g:ale_linters_ignore = { 'javascript': ['deno'] }
let g:ale_fixers = { '*': ['trim_whitespace', 'remove_trailing_lines'] }
fwiw, here's the output of `ALEInfo` (click to expand)

 Current Filetype: rust
Available Linters: ['analyzer', 'cargo', 'cspell', 'rls', 'rustc']
   Linter Aliases:
'analyzer' -> ['rust_analyzer']
  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:
" Press Space to read :help for a setting
let g:ale_rust_analyzer_config = {}
let g:ale_rust_analyzer_executable = 'rust-analyzer'
 
 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 = 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 = 'auto'
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
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 = {'*': ['trim_whitespace', 'remove_trailing_lines']}
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 = 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 = {'rust': ['analyzer']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {'javascript': ['deno']}
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%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 = 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 = 0
let g:ale_sign_error = 'E'
let g:ale_sign_info = 'I'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = 'E'
let g:ale_sign_style_warning = 'W'
let g:ale_sign_warning = 'W'
let g:ale_sign_highlight_linenrs = 0
let g:ale_type_map = {}
let g:ale_use_neovim_diagnostics_api = 0
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:

(executable check - success) rust-analyzer
(started) ['/bin/zsh', '-ic', '''rust-analyzer''']

happy to troubleshoot further if it's helpful. any pointers you could send my way would be much appreciated 🙏

rust-analyzer version: rust-analyzer 0.0.0 (0840038f0 2023-09-30) (via: rust-analyzer --version)

rustc version: rustc 1.72.1 (d5c2e9c34 2023-09-13) (via: rustc -V)

relevant settings: CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME are not set, ALE settings are included above. edit: i'm running ALE via vim-plug at dense-analysis/ale@53b01d6

fwiw, i installed both rust-analyzer and rustup-init via homebrew

Metadata

Assignees

No one assigned

    Labels

    A-third-party-clientC-supportCategory: support questionsS-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions