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

Only things I've already typed will show up as completion options [Rust] #3416

Closed
poperigby opened this issue Oct 28, 2020 · 3 comments
Closed
Labels

Comments

@poperigby
Copy link

Information

VIM version
NVIM v0.4.4
Build type: Release

Operating System
Arch Linux

What went wrong

With ALE completion enabled, when editing a .rs file, and starting to type the a few letters, all of the options are just things I've already typed in the file. So nothing that I haven't typed before is shown as an option for completion.

Reproducing the bug

  1. Enable ALE completion
  2. Open a .rs file
  3. Start typing

:ALEInfo

 Current Filetype: rust
Available Linters: ['analyzer', 'cargo', 'rls', 'rustc']
  Enabled Linters: ['cargo', 'rls']
  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_cargo_avoid_whole_workspace = 1
let g:ale_rust_cargo_check_all_targets = 0
let g:ale_rust_cargo_check_examples = 0
let g:ale_rust_cargo_check_tests = 0
let g:ale_rust_cargo_clippy_options = ''
let g:ale_rust_cargo_default_feature_behavior = 'default'
let g:ale_rust_cargo_include_features = ''
let g:ale_rust_cargo_target_dir = ''
let g:ale_rust_cargo_use_check = 1
let g:ale_rust_cargo_use_clippy = 0
let g:ale_rust_ignore_error_codes = []
let g:ale_rust_ignore_secondary_spans = 0
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 = v:null
let g:ale_completion_enabled = 1
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 = '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 = {'rust': ['rustfmt']}
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 = {'rust': ['rls', 'cargo']}
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 = '%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_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) cargo
(finished - exit code 0) ['/bin/sh', '-c', '''cargo'' --version']

<<<OUTPUT STARTS>>>
cargo 1.47.0 (f3c7e066a 2020-08-28)
<<<OUTPUT ENDS>>>

(executable check - success) rls
(started) ['/bin/sh', '-c', '''rls''']
(finished - exit code 0) ['/bin/sh', '-c', 'cd ''/home/cassidy/Projects/rust-sandbox'' && cargo check --frozen --message-format=json -q']

<<<OUTPUT STARTS>>>
{"reason":"compiler-artifact","package_id":"rust-sandbox 0.1.0 (path+file:///home/cassidy/Projects/rust-sandbox)","target":{"kind":["bin"],"crate_types":["bin"],"name":"rust-sandbox","src_path":"/home/cassidy/Projects/rust-sandbox/src/main.rs","edition":"2018","doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/cassidy/Projects/rust-sandbox/target/debug/deps/librust_sandbox-4a5969f2b1da3ab0.rmeta"],"executable":null,"fresh":true}
{"reason":"build-finished","success":true}
<<<OUTPUT ENDS>>>
@poperigby poperigby added the bug label Oct 28, 2020
@poperigby
Copy link
Author

The only linter that works with completion is RLS, but the linting doesn't work on that one. I'm trying to get rust-analyzer to work, where completion doesn't work, but linting does.

@nospam2998
Copy link
Contributor

This seems to be a rls specific issue. That language server has been deprecated and sunset. With it rls no longer available nor working, can we suggest this ticket to be closed?

@w0rp
Copy link
Member

w0rp commented Sep 8, 2023

I'll close this, and also mention that setting g:ale_completion_autoimport to 1 will probably solve the issue for any language server that lets you auto-import names.

@w0rp w0rp closed this as completed Sep 8, 2023
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

3 participants