-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LS: Add hovers for path segments #6649
Conversation
a05af38
to
10198aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @integraledelebesgue, @mkaput, and @orizi)
crates/cairo-lang-language-server/src/lang/inspect/defs.rs
line 330 at r1 (raw file):
/// Gets the module's documentation if it's available. pub fn documentation(&self) -> Option<String> { // Modules cannot have docstrings at the moment.
This is not true, get_item_documentation
should deal with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @integraledelebesgue, and @orizi)
crates/cairo-lang-language-server/src/lang/inspect/defs.rs
line 313 at r1 (raw file):
Some(stripped_path) => stripped_path.to_owned(), None => full_path, };
this is parent module full path. term full path as used here is very misleading
Code quote:
let full_path =
match full_path.strip_suffix(name.as_str()).and_then(|path| path.strip_suffix("::")) {
Some(stripped_path) => stripped_path.to_owned(),
None => full_path,
};
55e018f
to
e22ffcb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 5 files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @mkaput, @orizi, and @piotmag769)
crates/cairo-lang-language-server/src/lang/inspect/defs.rs
line 313 at r1 (raw file):
Previously, mkaput (Marek Kaput) wrote…
this is parent module full path. term full path as used here is very misleading
I rebuilt the path logic a bit and also changed those confusing names
crates/cairo-lang-language-server/src/lang/inspect/defs.rs
line 330 at r1 (raw file):
Previously, piotmag769 (Piotr Magiera) wrote…
This is not true,
get_item_documentation
should deal with it
You're right. I added a proper decumentation retrieval logic
e22ffcb
to
d38de43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @integraledelebesgue, and @orizi)
crates/cairo-lang-language-server/src/lang/inspect/defs.rs
line 101 at r2 (raw file):
} ResolvedItem::Generic(ResolvedGenericItem::Module(id)) => {
Out of curiosity: when do we enter each branch? What is a generic module? ;p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
crates/cairo-lang-language-server/src/lang/inspect/defs.rs
line 101 at r2 (raw file):
Previously, piotmag769 (Piotr Magiera) wrote…
Out of curiosity: when do we enter each branch? What is a generic module? ;p
I have no idea which semantic construct it corresponds to tbh. I just separated all branches somehow related to modules :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
d38de43
to
5fa2085
Compare
Closes #6540
Changes: