Add ability to separately set background color for highlighted brackets (#17566)
Closes https://github.com/zed-industries/zed/issues/16380 Currently brackets are highlighted with `editor.document_highlight.read_background`. This commit adds a separate `editor.document_highlight.bracket_background` theme setting so bracket highlights can be made more prominent without doing the same to other highlights, making the display too busy. (My own theme) https://github.com/user-attachments/assets/29a8c05e-2f1a-4c16-9be8-a4b4cb143548 I set defaults for light and dark theme that I hope are sensible and not too obnoxious, but noticeable so people can change it if they don't like it. Release Notes: - Added `editor.document_highlight.bracket_background` field to the theme to set background color of highlighted brackets. - This will fall back to `editor.document_highlight.read_background`, if not set. <img width="355" alt="Screenshot 2024-09-08 at 8 46 57 AM" src="https://github.com/user-attachments/assets/3270bb4d-19f5-4b34-8003-982377b2ceb6"> <img width="444" alt="Screenshot 2024-09-08 at 9 03 27 AM" src="https://github.com/user-attachments/assets/3b12d84d-913c-4bde-9132-9b10f4a8d49b"> --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
c7a79cfc02
commit
11058765be
5 changed files with 25 additions and 5 deletions
|
@ -32,7 +32,7 @@ pub fn refresh_matching_bracket_highlights(editor: &mut Editor, cx: &mut ViewCon
|
|||
opening_range.to_anchors(&snapshot.buffer_snapshot),
|
||||
closing_range.to_anchors(&snapshot.buffer_snapshot),
|
||||
],
|
||||
|theme| theme.editor_document_highlight_read_background,
|
||||
|theme| theme.editor_document_highlight_bracket_background,
|
||||
cx,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue