Add strikethrough to deprecated methods in CompletionsMenu (#9086)
Release Notes: - Added ([#8390](https://github.com/zed-industries/zed/issues/8390)). - Also Grays out deprecated methods Before <img width="730" alt="image" src="https://github.com/zed-industries/zed/assets/71665039/8b5e8009-22c2-43f7-b85b-79e571a5d282"> After <img width="773" alt="image" src="https://github.com/zed-industries/zed/assets/71665039/0aff572b-6d3f-4ed9-b08b-d925ee650817">
This commit is contained in:
parent
efe5203a09
commit
d4ec78f328
1 changed files with 12 additions and 3 deletions
|
@ -60,9 +60,9 @@ use gpui::{
|
||||||
AnyElement, AppContext, AsyncWindowContext, BackgroundExecutor, Bounds, ClipboardItem, Context,
|
AnyElement, AppContext, AsyncWindowContext, BackgroundExecutor, Bounds, ClipboardItem, Context,
|
||||||
DispatchPhase, ElementId, EventEmitter, FocusHandle, FocusableView, FontId, FontStyle,
|
DispatchPhase, ElementId, EventEmitter, FocusHandle, FocusableView, FontId, FontStyle,
|
||||||
FontWeight, HighlightStyle, Hsla, InteractiveText, KeyContext, Model, MouseButton,
|
FontWeight, HighlightStyle, Hsla, InteractiveText, KeyContext, Model, MouseButton,
|
||||||
ParentElement, Pixels, Render, SharedString, Styled, StyledText, Subscription, Task, TextStyle,
|
ParentElement, Pixels, Render, SharedString, StrikethroughStyle, Styled, StyledText,
|
||||||
UnderlineStyle, UniformListScrollHandle, View, ViewContext, ViewInputHandler, VisualContext,
|
Subscription, Task, TextStyle, UnderlineStyle, UniformListScrollHandle, View, ViewContext,
|
||||||
WeakView, WhiteSpace, WindowContext,
|
ViewInputHandler, VisualContext, WeakView, WhiteSpace, WindowContext,
|
||||||
};
|
};
|
||||||
use highlight_matching_bracket::refresh_matching_bracket_highlights;
|
use highlight_matching_bracket::refresh_matching_bracket_highlights;
|
||||||
use hover_popover::{hide_hover, HoverState};
|
use hover_popover::{hide_hover, HoverState};
|
||||||
|
@ -930,6 +930,15 @@ impl CompletionsMenu {
|
||||||
// Ignore font weight for syntax highlighting, as we'll use it
|
// Ignore font weight for syntax highlighting, as we'll use it
|
||||||
// for fuzzy matches.
|
// for fuzzy matches.
|
||||||
highlight.font_weight = None;
|
highlight.font_weight = None;
|
||||||
|
|
||||||
|
if completion.lsp_completion.deprecated.unwrap_or(false) {
|
||||||
|
highlight.strikethrough = Some(StrikethroughStyle {
|
||||||
|
thickness: 1.0.into(),
|
||||||
|
..Default::default()
|
||||||
|
});
|
||||||
|
highlight.color = Some(cx.theme().colors().text_muted);
|
||||||
|
}
|
||||||
|
|
||||||
(range, highlight)
|
(range, highlight)
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue