Revert "Extract syntax highlighting properties from tree-sitter highlight queries (#2797)"
This reverts commit45c635872b
, reversing changes made tof2b82369f2
.
This commit is contained in:
parent
b0ec05a732
commit
9e755bb855
57 changed files with 553 additions and 630 deletions
|
@ -8,48 +8,50 @@ type RoleCycleButton = TextStyle & {
|
|||
}
|
||||
// TODO: Replace these with zed types
|
||||
type RemainingTokens = TextStyle & {
|
||||
background: string
|
||||
margin: { top: number; right: number }
|
||||
background: string,
|
||||
margin: { top: number, right: number },
|
||||
padding: {
|
||||
right: number
|
||||
left: number
|
||||
top: number
|
||||
bottom: number
|
||||
}
|
||||
corner_radius: number
|
||||
right: number,
|
||||
left: number,
|
||||
top: number,
|
||||
bottom: number,
|
||||
},
|
||||
corner_radius: number,
|
||||
}
|
||||
|
||||
export default function assistant(): any {
|
||||
const theme = useTheme()
|
||||
|
||||
const interactive_role = (
|
||||
color: StyleSets
|
||||
): Interactive<RoleCycleButton> => {
|
||||
return interactive({
|
||||
base: {
|
||||
...text(theme.highest, "sans", color, { size: "sm" }),
|
||||
},
|
||||
state: {
|
||||
hovered: {
|
||||
const interactive_role = (color: StyleSets): Interactive<RoleCycleButton> => {
|
||||
return (
|
||||
interactive({
|
||||
base: {
|
||||
...text(theme.highest, "sans", color, { size: "sm" }),
|
||||
background: background(theme.highest, color, "hovered"),
|
||||
},
|
||||
clicked: {
|
||||
...text(theme.highest, "sans", color, { size: "sm" }),
|
||||
background: background(theme.highest, color, "pressed"),
|
||||
state: {
|
||||
hovered: {
|
||||
...text(theme.highest, "sans", color, { size: "sm" }),
|
||||
background: background(theme.highest, color, "hovered"),
|
||||
},
|
||||
clicked: {
|
||||
...text(theme.highest, "sans", color, { size: "sm" }),
|
||||
background: background(theme.highest, color, "pressed"),
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
const tokens_remaining = (color: StyleSets): RemainingTokens => {
|
||||
return {
|
||||
...text(theme.highest, "mono", color, { size: "xs" }),
|
||||
background: background(theme.highest, "on", "default"),
|
||||
margin: { top: 12, right: 20 },
|
||||
padding: { right: 4, left: 4, top: 1, bottom: 1 },
|
||||
corner_radius: 6,
|
||||
}
|
||||
return (
|
||||
{
|
||||
...text(theme.highest, "mono", color, { size: "xs" }),
|
||||
background: background(theme.highest, "on", "default"),
|
||||
margin: { top: 12, right: 20 },
|
||||
padding: { right: 4, left: 4, top: 1, bottom: 1 },
|
||||
corner_radius: 6,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -91,10 +93,7 @@ export default function assistant(): any {
|
|||
base: {
|
||||
background: background(theme.middle),
|
||||
padding: { top: 4, bottom: 4 },
|
||||
border: border(theme.middle, "default", {
|
||||
top: true,
|
||||
overlay: true,
|
||||
}),
|
||||
border: border(theme.middle, "default", { top: true, overlay: true }),
|
||||
},
|
||||
state: {
|
||||
hovered: {
|
||||
|
@ -102,7 +101,7 @@ export default function assistant(): any {
|
|||
},
|
||||
clicked: {
|
||||
background: background(theme.middle, "pressed"),
|
||||
},
|
||||
}
|
||||
},
|
||||
}),
|
||||
saved_at: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue