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
In a Rust file with completions enabled, when the completions are triggered the diagnostics are updated as if linting had been triggered. This naturally results in several errors caused by being mid-edit, and is specially annoying with slow LSP servers like RLS because by the time the diagnostics are shown as highlights they're out of sync with the actual buffer contents.
Looking at the code and tinkering with it I'm thinking it may be the following line that's causing this behavior. It would also explain why I'm not seeing the behavior with tsserver, since it's handled differently.
" Send a message saying the buffer has changed first, otherwise
" completions won't know what text is nearby.
callale#lsp#NotifyForChanges(l:id, l:buffer)
Information
NVIM v0.3.8
Build type: Release
Operating System: Linux
:ALEInfo
Current Filetype: rust
Available Linters: ['cargo', 'rls', 'rustc']
Enabled Linters: ['rls']
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_rls_config = {}
let g:ale_rust_rls_executable = 'rls'
let g:ale_rust_rls_toolchain = ''
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 = 1
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_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 = {'javascript': ['tsserver'], 'rust': ['rls'], 'typescript': ['tsserver']}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_lsp_root = {}
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_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 = 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:
(started) ['/bin/sh', '-c', '''rls''']
The text was updated successfully, but these errors were encountered:
In a Rust file with completions enabled, when the completions are triggered the diagnostics are updated as if linting had been triggered. This naturally results in several errors caused by being mid-edit, and is specially annoying with slow LSP servers like RLS because by the time the diagnostics are shown as highlights they're out of sync with the actual buffer contents.
Looking at the code and tinkering with it I'm thinking it may be the following line that's causing this behavior. It would also explain why I'm not seeing the behavior with tsserver, since it's handled differently.
ale/autoload/ale/completion.vim
Lines 521 to 523 in dd1e102
Information
NVIM v0.3.8
Build type: Release
Operating System: Linux
:ALEInfo
The text was updated successfully, but these errors were encountered: