Show source of diagnostic hovers

This commit is contained in:
Julia
2023-04-27 14:35:34 -04:00
parent 45c7073934
commit 3f7533a0b4
9 changed files with 48 additions and 24 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
import { ColorScheme } from "../themes/common/colorScheme"
import { background, border, text } from "./components"
import { background, border, foreground, text } from "./components"
export default function HoverPopover(colorScheme: ColorScheme) {
let layer = colorScheme.middle
@@ -36,10 +36,11 @@ export default function HoverPopover(colorScheme: ColorScheme) {
background: background(layer, "negative"),
border: border(layer, "negative"),
},
block_style: {
blockStyle: {
padding: { top: 4 },
},
prose: text(layer, "sans", { size: "sm" }),
diagnosticSource: text(layer, "sans", { size: "sm", underline: true, color: foreground(layer, "accent") }),
highlight: colorScheme.ramps.neutral(0.5).alpha(0.2).hex(), // TODO: blend was used here. Replace with something better
}
}