Various hover improvements (#5617)
* Show more info on hover for variables Signed-off-by: Nick Cameron <nrc@ncameron.org> * Move hover impls to lsp module Signed-off-by: Nick Cameron <nrc@ncameron.org> * Make hover work on names inside calls, fix doc line breaking, trim docs in tool tips Signed-off-by: Nick Cameron <nrc@ncameron.org> * Test the new hovers; fix signature syntax Signed-off-by: Nick Cameron <nrc@ncameron.org> * Hover tips for kwargs Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -62,13 +62,13 @@ mod test_examples_show {
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types, missing_docs)]
|
||||
#[doc = "Std lib function: show\nThis is some function.\nIt does shit."]
|
||||
#[doc = "Std lib function: show\nThis is some function. It does shit."]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, schemars :: JsonSchema, ts_rs :: TS)]
|
||||
#[ts(export)]
|
||||
pub(crate) struct Show {}
|
||||
|
||||
#[allow(non_upper_case_globals, missing_docs)]
|
||||
#[doc = "Std lib function: show\nThis is some function.\nIt does shit."]
|
||||
#[doc = "Std lib function: show\nThis is some function. It does shit."]
|
||||
pub(crate) const Show: Show = Show {};
|
||||
fn boxed_show(
|
||||
exec_state: &mut crate::execution::ExecState,
|
||||
@ -90,11 +90,11 @@ impl crate::docs::StdLibFn for Show {
|
||||
}
|
||||
|
||||
fn summary(&self) -> String {
|
||||
"This is some function.".to_string()
|
||||
"This is some function. It does shit.".to_string()
|
||||
}
|
||||
|
||||
fn description(&self) -> String {
|
||||
"It does shit.".to_string()
|
||||
"".to_string()
|
||||
}
|
||||
|
||||
fn tags(&self) -> Vec<String> {
|
||||
@ -175,9 +175,11 @@ impl crate::docs::StdLibFn for Show {
|
||||
#[doc = r" This is some function."]
|
||||
#[doc = r" It does shit."]
|
||||
#[doc = r""]
|
||||
#[doc = r" This is code."]
|
||||
#[doc = r" It does other shit."]
|
||||
#[doc = r" show"]
|
||||
#[doc = r" ```"]
|
||||
#[doc = r" This is code."]
|
||||
#[doc = r" It does other shit."]
|
||||
#[doc = r" show"]
|
||||
#[doc = r" ```"]
|
||||
fn inner_show(#[doc = r" The args to do shit to."] args: Option<f64>) -> Result<Box<f64>> {
|
||||
args
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user