fix: Fix only_types config filtering out traits from world symbols
This commit is contained in:
parent
1b678231d7
commit
d6d188fce2
2 changed files with 8 additions and 2 deletions
|
|
@ -323,6 +323,8 @@ impl Query {
|
|||
hir::ModuleDef::Adt(..)
|
||||
| hir::ModuleDef::TypeAlias(..)
|
||||
| hir::ModuleDef::BuiltinType(..)
|
||||
| hir::ModuleDef::TraitAlias(..)
|
||||
| hir::ModuleDef::Trait(..)
|
||||
)
|
||||
{
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -175,8 +175,12 @@ impl TryToNav for FileSymbol {
|
|||
|
||||
Some(NavigationTarget {
|
||||
file_id: full_range.file_id,
|
||||
name: if self.is_alias { self.def.name(db)?.to_smol_str() } else { self.name.clone() },
|
||||
alias: if self.is_alias { Some(self.name.clone()) } else { None },
|
||||
name: self
|
||||
.is_alias
|
||||
.then(|| self.def.name(db))
|
||||
.flatten()
|
||||
.map_or_else(|| self.name.clone(), |it| it.to_smol_str()),
|
||||
alias: self.is_alias.then(|| self.name.clone()),
|
||||
kind: Some(hir::ModuleDefId::from(self.def).into()),
|
||||
full_range: full_range.range,
|
||||
focus_range,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue