Merge pull request #1868 from zed-industries/readd-search-match-highlight

Update search match highlight and occurrence style
This commit is contained in:
Nate Butler 2022-11-09 18:37:17 -05:00 committed by Max Brunsfeld
parent 1375c6b9e5
commit d66e4901ea
2 changed files with 8 additions and 6 deletions

View file

@ -151,10 +151,10 @@ export default function editor(colorScheme: ColorScheme) {
widthEm: 0.16, widthEm: 0.16,
cornerRadius: 0.05, cornerRadius: 0.05,
}, },
documentHighlightReadBackground: colorScheme.ramps /** Highlights matching occurences of what is under the cursor
.neutral(0.5) * as well as matched brackets
.alpha(0.2) */
.hex(), // TODO: This was blend documentHighlightReadBackground: withOpacity(foreground(layer, "accent"), 0.1),
documentHighlightWriteBackground: colorScheme.ramps documentHighlightWriteBackground: colorScheme.ramps
.neutral(0.5) .neutral(0.5)
.alpha(0.4) .alpha(0.4)

View file

@ -1,5 +1,6 @@
import { ColorScheme } from "../themes/common/colorScheme"; import { ColorScheme } from "../themes/common/colorScheme";
import { background, border, text } from "./components"; import { withOpacity } from "../utils/color";
import { background, border, foreground, text } from "./components";
export default function search(colorScheme: ColorScheme) { export default function search(colorScheme: ColorScheme) {
let layer = colorScheme.highest; let layer = colorScheme.highest;
@ -26,7 +27,8 @@ export default function search(colorScheme: ColorScheme) {
}; };
return { return {
matchBackground: background(layer), // theme.editor.highlight.match, // TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactive
matchBackground: withOpacity(foreground(layer, "accent"), 0.4),
tabIconSpacing: 8, tabIconSpacing: 8,
tabIconWidth: 14, tabIconWidth: 14,
optionButton: { optionButton: {