6251: Semantic Highlight: Add Callable modifier for variables r=matklad a=GrayJack This PR added the `HighlightModifier::Callable` variant and assigned it to variables and parameters that are fn pointers, closures and implements FnOnce trait. This allows to colorize these variables/parameters when used in call expression. 6310: Rewrite algo::diff to support insertion and deletion r=matklad a=Veykril This in turn also makes `algo::diff` generate finer diffs(maybe even minimal diffs?) as insertions and deletions aren't always represented as as replacements of parent nodes now. Required for #6287 to go on. Co-authored-by: GrayJack <gr41.j4ck@gmail.com> Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
@@ -425,6 +425,7 @@ fn semantic_token_type_and_modifiers(
|
||||
HighlightModifier::Mutable => semantic_tokens::MUTABLE,
|
||||
HighlightModifier::Consuming => semantic_tokens::CONSUMING,
|
||||
HighlightModifier::Unsafe => semantic_tokens::UNSAFE,
|
||||
HighlightModifier::Callable => semantic_tokens::CALLABLE,
|
||||
};
|
||||
mods |= modifier;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user