completion.addColonsToModule controls ::-suffix-emitting only for module in a path, but doesn't control same behavior for crate, self and super — they always have the form of "token::". The crate/self/super is a special cases of the module.
Use-case, current behavior
Legend: <|> — cursor position, completions requested by ra ls.
- Call:
cra<|>::module::thing(); — completion is always crate::, adds extra path-delimiter, it's a PITA to delete it every time;
- Attr:
#[crat<|>::thing] — same as above
- Use:
use crat<|>::* — same as above, we'll get use crate::::*
Expected behavior
Setting completion.addColonsToModule controls crate, self and super in same way as other mod- parts of a path.
So, for completion.addColonsToModule = false expected behavior is:
supe<|> and accepting super-completion, expected final result should be super;
supe<|>:: and accepting super-completion, expected final result should be super::;
rust-analyzer version: rust-analyzer 1.98.0-nightly (57d06900 2026-05-27)
rustc version: rustc 1.98.0-nightly (57d06900f 2026-05-27)
editor or extension: any (VSCode, Gram, Zed, etc..)
completion.addColonsToModulecontrols::-suffix-emitting only for module in a path, but doesn't control same behavior forcrate,selfandsuper— they always have the form of "token::". Thecrate/self/superis a special cases of the module.Use-case, current behavior
Legend:
<|>— cursor position, completions requested by ra ls.cra<|>::module::thing();— completion is alwayscrate::, adds extra path-delimiter, it's a PITA to delete it every time;#[crat<|>::thing]— same as aboveuse crat<|>::*— same as above, we'll getuse crate::::*Expected behavior
Setting
completion.addColonsToModulecontrolscrate,selfandsuperin same way as other mod- parts of a path.So, for
completion.addColonsToModule = falseexpected behavior is:supe<|>and acceptingsuper-completion, expected final result should besuper;supe<|>::and acceptingsuper-completion, expected final result should besuper::;rust-analyzer version:
rust-analyzer 1.98.0-nightly (57d06900 2026-05-27)rustc version:
rustc 1.98.0-nightly (57d06900f 2026-05-27)editor or extension: any (VSCode, Gram, Zed, etc..)