mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
feat: Make private editable completions configurable, disable by default
This commit is contained in:
parent
789f2b9cb6
commit
2a7793d912
7 changed files with 22 additions and 2 deletions
|
@ -360,6 +360,9 @@ impl<'a> CompletionContext<'a> {
|
|||
None => return Visible::No,
|
||||
};
|
||||
if !vis.is_visible_from(self.db, module.into()) {
|
||||
if !self.config.enable_private_editable {
|
||||
return Visible::No;
|
||||
}
|
||||
// If the definition location is editable, also show private items
|
||||
let root_file = defining_crate.root_file(self.db);
|
||||
let source_root_id = self.db.file_source_root(root_file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue