Closed VVishion closed 1 month ago
I also have this problem, but when I revert the version of rust-analyzer to 2024-09-30, the problem is gone; It seems this problem show up at newest version of rust-analyzer.
I tried to set rust-analyzer explicitly to enable: rust-analyzer.completion.callable.snippets (default: "fill_arguments")
, but it doesn't work.
And the problem I encountered is:
Soooo. I investigated your claim and it works now. What I did:
In lua/plugins/lsp-config.lua
changed { 'williamboman/mason.nvim', config = true },
to { 'williamboman/mason.nvim', opts = { PATH = "append" } },
This will only use masons binaries if your system doesnt have one (in $PATH).
Then, ran
rustup component add rust-src
rustup component add rust-analyzer
For info:
which rust-analyzer
/home/vvishion/.cargo/bin/rust-analyzer
rust-analyzer --version
rust-analyzer 1.81.0 (eeb90cd 2024-09-04)
FAQ
Announcement
Minimal reproducible full config
nvim v0.10.2 rust-analyzer 0.3.2146-standalone
Did :Lazy sync, rust-analyzer up-to-date
init.lua
lua/plugin/lsp-config.lua
lua/plugin/tree-sitter.lua
lua/plugin/rust.lua
lua/plugin/completion.lua
Description
Everytime I complete a function call, which I have not autocompleted since the file was opened it appends
(…)
to the function name. Every subsequent time it autocompletes the whole function signature, similar tosome_function(some_arg, another_arg)
.Steps to reproduce
Write some rust code
Expected behavior
Always autocomplete the whole function signature with args.
Actual behavior
Autocompletes
some_function(some_arg, another_arg)
withsome_function(…)
if it was the first time I autocompleted that particular function.Additional context
What I noticed: Suggestions which autocomplete successfully only preview their name when selected. Suggestions which autocomplete with
(…)
also contain it in their preview when selected. Also, function without arguments never autocomplete with(…)
, but correctly with()
.Also, with coq it seems to happen once for all functions (instead of once for every).