Merge pull request #6569 from faldor20/docs

Add docs to completions and hover
This commit is contained in:
Richard Feldman 2024-03-16 11:22:58 -04:00 committed by GitHub
commit 14ba398b5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 954 additions and 597 deletions

View file

@ -79,6 +79,32 @@ pub enum HeaderType<'a> {
},
}
impl<'a> HeaderType<'a> {
pub fn get_name(self) -> Option<&'a str> {
match self {
Self::Interface { name, .. }
| Self::Builtin { name, .. }
| Self::Hosted { name, .. } => Some(name.into()),
Self::App {
output_name: StrLiteral::PlainLine(name),
..
}
| Self::Platform {
config_shorthand: name,
..
}
| Self::Package {
config_shorthand: name,
..
} => Some(name),
Self::App { .. } => {
//TODO:Eli This can be removed once module params is implemented and app names are no longer strings
None
}
}
}
}
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
pub enum Version<'a> {
Exact(&'a str),