VIM version
NVIM v0.2.2
Build type: Release
Operating System: Arch Linux, urxvt
Current Filetype: rust
Available Linters: ['cargo', 'rls', 'rustc']
Enabled Linters: ['rls']
Linter Variables:
let g:ale_rust_rls_executable = 'rls'
let g:ale_rust_rls_toolchain = 'nightly'
Global Variables:
let g:ale_cache_executable_check_failures = 0
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_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 = {}
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_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {'rust': ['rls']}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_list_vertical = 0
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 = 0
let g:ale_open_list = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
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 = 0
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_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(started) ['/bin/zsh', '-c', '''rls'' +''nightly''']
Rls lints never show up at all in file. I remember they used to a long time ago. I tried reducing my config file down to the bare minimum for ale and rls to work, and it still never showed anything.
Removing my let g:ale_linters = {'rust': ['rls']} line and allowing cargo to be the linter works so I think this is specific to the rls setup.
Steps for repeating the bug:
fn main() {
println!("Hello World")
}
}
Found the issue, I really thought I had rls installed since I could run rls and it would be running. But it turns out I had it installed on rust stable for some reason. And ale was expecting it to be on nightly, not sure why I didn't get any blatant errors. Maybe calling rls nightly when you only have rls on stable will run rls stable.
Anyway, I solved this by running rustup component remove rls-preview --toolchain stable to remove rls from stable and then rustup component add rls-preview --toolchain nightly
Hope this helps someone in the future,
It would be nice to automatically detect which options to use, if possible. You can also set g:ale_rust_rls_toolchain to 'stable' or an empty string to use the stable toolchain. The stable toolchain has only recently become widely used, so 'nightly' has been a good default value for a while. I might consider changing the default later.
Most helpful comment
Found the issue, I really thought I had rls installed since I could run
rlsand it would be running. But it turns out I had it installed on rust stable for some reason. And ale was expecting it to be on nightly, not sure why I didn't get any blatant errors. Maybe callingrls nightlywhen you only have rls on stable will run rls stable.Anyway, I solved this by running
rustup component remove rls-preview --toolchain stableto remove rls from stable and thenrustup component add rls-preview --toolchain nightlyHope this helps someone in the future,