mirror of https://github.com/lapce/lapce.git
add config for brackets higlihghting
This commit is contained in:
parent
e51ffc9e04
commit
b80fc412cf
|
@ -20,6 +20,7 @@ auto-closing-matching-pairs = true
|
|||
hover-delay = 300 # ms
|
||||
modal-mode-relative-line-numbers = true
|
||||
format-on-save = false
|
||||
highlight-matching-brackets = true
|
||||
autosave-interval = 0
|
||||
enable-inlay-hints = true
|
||||
inlay-hint-font-family = ""
|
||||
|
|
|
@ -353,8 +353,13 @@ pub struct EditorConfig {
|
|||
desc = "Whether it should format the document on save (if there is an available formatter)"
|
||||
)]
|
||||
pub format_on_save: bool,
|
||||
|
||||
#[field_names(desc = "If matching brackets are highlighted")]
|
||||
pub highlight_matching_brackets: bool,
|
||||
|
||||
#[field_names(desc = "If inlay hints should be displayed")]
|
||||
pub enable_inlay_hints: bool,
|
||||
|
||||
#[field_names(
|
||||
desc = "Set the inlay hint font family. If empty, it uses the editor font family."
|
||||
)]
|
||||
|
|
|
@ -1901,6 +1901,10 @@ fn highlight_brackets(
|
|||
data: &LapceEditorBufferData,
|
||||
screen_lines: &ScreenLines,
|
||||
) {
|
||||
if !data.config.editor.highlight_matching_brackets {
|
||||
return;
|
||||
}
|
||||
|
||||
if screen_lines.lines.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
@ -1978,7 +1982,7 @@ fn paint_bracket_highlight(
|
|||
.config
|
||||
.get_color_unchecked(LapceTheme::EDITOR_CARET)
|
||||
.clone()
|
||||
.with_alpha(0.5),
|
||||
.with_alpha(0.2),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue