Merge #630
630: Fill in DocumentSymbol::detail r=matklad a=hban Closes: #516 I just pulled type text from the syntax node and "formatted" is bit. VS Code can't really handle multi-line symbol detail (it's will crop it when rendering), so that formatting will just collapse all white-space to singe space. It isn't pretty, but maybe there's a better way. Issue also mentions "need to be done for `NavigationTarget` to `SymbolInformation`", but `SymbolInformation` doesn't have detail field on it? Co-authored-by: Hrvoje Ban <hban@users.noreply.github.com>
This commit is contained in:
@@ -598,7 +598,11 @@ impl ast::NameOwner for ConstDef {}
|
||||
impl ast::TypeParamsOwner for ConstDef {}
|
||||
impl ast::AttrsOwner for ConstDef {}
|
||||
impl ast::DocCommentsOwner for ConstDef {}
|
||||
impl ConstDef {}
|
||||
impl ConstDef {
|
||||
pub fn type_ref(&self) -> Option<&TypeRef> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
}
|
||||
|
||||
// ContinueExpr
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
@@ -3407,7 +3411,11 @@ impl ast::NameOwner for StaticDef {}
|
||||
impl ast::TypeParamsOwner for StaticDef {}
|
||||
impl ast::AttrsOwner for StaticDef {}
|
||||
impl ast::DocCommentsOwner for StaticDef {}
|
||||
impl StaticDef {}
|
||||
impl StaticDef {
|
||||
pub fn type_ref(&self) -> Option<&TypeRef> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
}
|
||||
|
||||
// Stmt
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
@@ -3948,7 +3956,11 @@ impl ast::NameOwner for TypeDef {}
|
||||
impl ast::TypeParamsOwner for TypeDef {}
|
||||
impl ast::AttrsOwner for TypeDef {}
|
||||
impl ast::DocCommentsOwner for TypeDef {}
|
||||
impl TypeDef {}
|
||||
impl TypeDef {
|
||||
pub fn type_ref(&self) -> Option<&TypeRef> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
}
|
||||
|
||||
// TypeParam
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
||||
Reference in New Issue
Block a user