Update Hint Style
zzz
This commit is contained in:
parent
67214f0e55
commit
143a020694
5 changed files with 20 additions and 1 deletions
|
@ -1392,7 +1392,7 @@ impl EditorElement {
|
||||||
} else {
|
} else {
|
||||||
let style = &self.style;
|
let style = &self.style;
|
||||||
let chunks = snapshot
|
let chunks = snapshot
|
||||||
.chunks(rows.clone(), true, Some(style.theme.suggestion))
|
.chunks(rows.clone(), true, Some(style.theme.hint))
|
||||||
.map(|chunk| {
|
.map(|chunk| {
|
||||||
let mut highlight_style = chunk
|
let mut highlight_style = chunk
|
||||||
.syntax_highlight_id
|
.syntax_highlight_id
|
||||||
|
|
|
@ -689,6 +689,7 @@ pub struct Editor {
|
||||||
pub line_number_active: Color,
|
pub line_number_active: Color,
|
||||||
pub guest_selections: Vec<SelectionStyle>,
|
pub guest_selections: Vec<SelectionStyle>,
|
||||||
pub syntax: Arc<SyntaxTheme>,
|
pub syntax: Arc<SyntaxTheme>,
|
||||||
|
pub hint: HighlightStyle,
|
||||||
pub suggestion: HighlightStyle,
|
pub suggestion: HighlightStyle,
|
||||||
pub diagnostic_path_header: DiagnosticPathHeader,
|
pub diagnostic_path_header: DiagnosticPathHeader,
|
||||||
pub diagnostic_header: DiagnosticHeader,
|
pub diagnostic_header: DiagnosticHeader,
|
||||||
|
|
0
styles/src/styleTree/editor.ts
Normal file
0
styles/src/styleTree/editor.ts
Normal file
|
@ -53,6 +53,7 @@ export default function editor(theme: ColorScheme): any {
|
||||||
active_line_background: with_opacity(background(layer, "on"), 0.75),
|
active_line_background: with_opacity(background(layer, "on"), 0.75),
|
||||||
highlighted_line_background: background(layer, "on"),
|
highlighted_line_background: background(layer, "on"),
|
||||||
// Inline autocomplete suggestions, Co-pilot suggestions, etc.
|
// Inline autocomplete suggestions, Co-pilot suggestions, etc.
|
||||||
|
hint: syntax.hint,
|
||||||
suggestion: syntax.predictive,
|
suggestion: syntax.predictive,
|
||||||
code_actions: {
|
code_actions: {
|
||||||
indicator: toggleable({
|
indicator: toggleable({
|
||||||
|
|
|
@ -17,6 +17,7 @@ export interface Syntax {
|
||||||
"comment.doc": SyntaxHighlightStyle
|
"comment.doc": SyntaxHighlightStyle
|
||||||
primary: SyntaxHighlightStyle
|
primary: SyntaxHighlightStyle
|
||||||
predictive: SyntaxHighlightStyle
|
predictive: SyntaxHighlightStyle
|
||||||
|
hint: SyntaxHighlightStyle
|
||||||
|
|
||||||
// === Formatted Text ====== /
|
// === Formatted Text ====== /
|
||||||
emphasis: SyntaxHighlightStyle
|
emphasis: SyntaxHighlightStyle
|
||||||
|
@ -146,12 +147,23 @@ function build_default_syntax(color_scheme: ColorScheme): Syntax {
|
||||||
"lch"
|
"lch"
|
||||||
)
|
)
|
||||||
.hex()
|
.hex()
|
||||||
|
// Mix the neutral and green colors to get a
|
||||||
|
// hint color distinct from any other color in the theme
|
||||||
|
const hint = chroma
|
||||||
|
.mix(
|
||||||
|
color_scheme.ramps.neutral(0.6).hex(),
|
||||||
|
color_scheme.ramps.blue(0.4).hex(),
|
||||||
|
0.45,
|
||||||
|
"lch"
|
||||||
|
)
|
||||||
|
.hex()
|
||||||
|
|
||||||
const color = {
|
const color = {
|
||||||
primary: color_scheme.ramps.neutral(1).hex(),
|
primary: color_scheme.ramps.neutral(1).hex(),
|
||||||
comment: color_scheme.ramps.neutral(0.71).hex(),
|
comment: color_scheme.ramps.neutral(0.71).hex(),
|
||||||
punctuation: color_scheme.ramps.neutral(0.86).hex(),
|
punctuation: color_scheme.ramps.neutral(0.86).hex(),
|
||||||
predictive: predictive,
|
predictive: predictive,
|
||||||
|
hint: hint,
|
||||||
emphasis: color_scheme.ramps.blue(0.5).hex(),
|
emphasis: color_scheme.ramps.blue(0.5).hex(),
|
||||||
string: color_scheme.ramps.orange(0.5).hex(),
|
string: color_scheme.ramps.orange(0.5).hex(),
|
||||||
function: color_scheme.ramps.yellow(0.5).hex(),
|
function: color_scheme.ramps.yellow(0.5).hex(),
|
||||||
|
@ -183,6 +195,11 @@ function build_default_syntax(color_scheme: ColorScheme): Syntax {
|
||||||
color: color.predictive,
|
color: color.predictive,
|
||||||
italic: true,
|
italic: true,
|
||||||
},
|
},
|
||||||
|
hint: {
|
||||||
|
color: color.hint,
|
||||||
|
weight: font_weights.bold,
|
||||||
|
// italic: true,
|
||||||
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
color: color.emphasis,
|
color: color.emphasis,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue