Skip to content

Commit e87c24e

Browse files
feat: add new DiagnosticOk highlight
1 parent ee3525f commit e87c24e

File tree

12 files changed

+26
-5
lines changed

12 files changed

+26
-5
lines changed

doc/nightfox.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -439,16 +439,16 @@ spec.syntax The `syntax` table maps
439439
spec.diag The `diag` table maps |nightfox-palette|
440440
colors to vim diagnostic colors values.
441441
These values are: `error`, `warn`,
442-
`info` and `hint`.
442+
`info`, `hint`, and `ok`.
443443

444444

445445
*nightfox-spec.diag_bg*
446446

447447
spec.diag_bg The `diag_bg` table maps
448448
|nightfox-palette| colors to vim
449449
diagnostic background colors. These
450-
values are: `error`, `warn`, `info` and
451-
`hint`.
450+
values are: `error`, `warn`, `info`,
451+
`hint`, and `ok`.
452452

453453

454454
*nightfox-spec.diff*

lua/nightfox/group/modules/diagnostic.lua

+4
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,25 @@ function M.get(spec, config, opts)
1010
DiagnosticWarn = { fg = d.warn },
1111
DiagnosticInfo = { fg = d.info },
1212
DiagnosticHint = { fg = d.hint },
13+
DiagnosticOk = { fg = d.ok },
1314

1415
DiagnosticSignError = { link = "DiagnosticError" },
1516
DiagnosticSignWarn = { link = "DiagnosticWarn" },
1617
DiagnosticSignInfo = { link = "DiagnosticInfo" },
1718
DiagnosticSignHint = { link = "DiagnosticHint" },
19+
DiagnosticSignOk = { link = "DiagnosticOk" },
1820

1921
DiagnosticVirtualTextError = { fg = d.error, bg = opts.background and dbg.error or "NONE" },
2022
DiagnosticVirtualTextWarn = { fg = d.warn, bg = opts.background and dbg.warn or "NONE" },
2123
DiagnosticVirtualTextInfo = { fg = d.info, bg = opts.background and dbg.info or "NONE" },
2224
DiagnosticVirtualTextHint = { fg = d.hint, bg = opts.background and dbg.hint or "NONE" },
25+
DiagnosticVirtualTextOk = { fg = d.ok, bg = opts.background and dbg.ok or "NONE" },
2326

2427
DiagnosticUnderlineError = { style = "undercurl", sp = d.error },
2528
DiagnosticUnderlineWarn = { style = "undercurl", sp = d.warn },
2629
DiagnosticUnderlineInfo = { style = "undercurl", sp = d.info },
2730
DiagnosticUnderlineHint = { style = "undercurl", sp = d.hint },
31+
DiagnosticUnderlineOk = { style = "undercurl", sp = d.ok },
2832
}
2933
end
3034

lua/nightfox/palette/carbonfox.lua

+2
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@ local function generate_spec(pal)
8989
warn = pal.magenta.base,
9090
info = pal.blue.base,
9191
hint = pal.orange.base,
92+
ok = pal.green.base,
9293
}
9394

9495
spec.diag_bg = {
9596
error = C(spec.bg1):blend(C(spec.diag.error), 0.15):to_css(),
9697
warn = C(spec.bg1):blend(C(spec.diag.warn), 0.15):to_css(),
9798
info = C(spec.bg1):blend(C(spec.diag.info), 0.15):to_css(),
9899
hint = C(spec.bg1):blend(C(spec.diag.hint), 0.15):to_css(),
100+
ok = C(spec.bg1):blend(C(spec.diag.ok), 0.15):to_css(),
99101
}
100102

101103
spec.diff = {

lua/nightfox/palette/dawnfox.lua

+2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ local function generate_spec(pal)
8383
warn = pal.yellow.base,
8484
info = pal.blue.base,
8585
hint = pal.green.base,
86+
ok = pal.green.base,
8687
}
8788

8889
spec.diag_bg = {
8990
error = C(spec.bg1):blend(C(spec.diag.error), 0.3):to_css(),
9091
warn = C(spec.bg1):blend(C(spec.diag.warn), 0.3):to_css(),
9192
info = C(spec.bg1):blend(C(spec.diag.info), 0.3):to_css(),
9293
hint = C(spec.bg1):blend(C(spec.diag.hint), 0.3):to_css(),
94+
ok = C(spec.bg1):blend(C(spec.diag.ok), 0.3):to_css(),
9395
}
9496

9597
spec.diff = {

lua/nightfox/palette/dayfox.lua

+2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ local function generate_spec(pal)
8383
warn = pal.yellow.base,
8484
info = pal.blue.base,
8585
hint = pal.green.base,
86+
ok = pal.green.base,
8687
}
8788

8889
spec.diag_bg = {
8990
error = C(spec.bg1):blend(C(spec.diag.error), 0.3):to_css(),
9091
warn = C(spec.bg1):blend(C(spec.diag.warn), 0.3):to_css(),
9192
info = C(spec.bg1):blend(C(spec.diag.info), 0.3):to_css(),
9293
hint = C(spec.bg1):blend(C(spec.diag.hint), 0.3):to_css(),
94+
ok = C(spec.bg1):blend(C(spec.diag.ok), 0.3):to_css(),
9395
}
9496

9597
spec.diff = {

lua/nightfox/palette/duskfox.lua

+2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ local function generate_spec(pal)
8383
warn = pal.yellow.base,
8484
info = pal.blue.base,
8585
hint = pal.green.base,
86+
ok = pal.green.base,
8687
}
8788

8889
spec.diag_bg = {
8990
error = C(spec.bg1):blend(C(spec.diag.error), 0.15):to_css(),
9091
warn = C(spec.bg1):blend(C(spec.diag.warn), 0.15):to_css(),
9192
info = C(spec.bg1):blend(C(spec.diag.info), 0.15):to_css(),
9293
hint = C(spec.bg1):blend(C(spec.diag.hint), 0.15):to_css(),
94+
ok = C(spec.bg1):blend(C(spec.diag.ok), 0.15):to_css(),
9395
}
9496

9597
spec.diff = {

lua/nightfox/palette/nightfox.lua

+2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ local function generate_spec(pal)
8383
warn = pal.yellow.base,
8484
info = pal.blue.base,
8585
hint = pal.green.base,
86+
ok = pal.green.base,
8687
}
8788

8889
spec.diag_bg = {
8990
error = C(spec.bg1):blend(C(spec.diag.error), 0.2):to_css(),
9091
warn = C(spec.bg1):blend(C(spec.diag.warn), 0.2):to_css(),
9192
info = C(spec.bg1):blend(C(spec.diag.info), 0.2):to_css(),
9293
hint = C(spec.bg1):blend(C(spec.diag.hint), 0.2):to_css(),
94+
ok = C(spec.bg1):blend(C(spec.diag.ok), 0.2):to_css(),
9395
}
9496

9597
spec.diff = {

lua/nightfox/palette/nordfox.lua

+2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ local function generate_spec(pal)
8383
warn = pal.yellow.base,
8484
info = pal.blue.base,
8585
hint = pal.green.base,
86+
ok = pal.green.base,
8687
}
8788

8889
spec.diag_bg = {
8990
error = C(spec.bg1):blend(C(spec.diag.error), 0.2):to_css(),
9091
warn = C(spec.bg1):blend(C(spec.diag.warn), 0.2):to_css(),
9192
info = C(spec.bg1):blend(C(spec.diag.info), 0.2):to_css(),
9293
hint = C(spec.bg1):blend(C(spec.diag.hint), 0.2):to_css(),
94+
ok = C(spec.bg1):blend(C(spec.diag.ok), 0.2):to_css(),
9395
}
9496

9597
spec.diff = {

lua/nightfox/palette/terafox.lua

+2
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ local function generate_spec(pal)
8787
warn = pal.yellow.base,
8888
info = pal.blue.base,
8989
hint = pal.green.base,
90+
ok = pal.green.base,
9091
}
9192

9293
spec.diag_bg = {
9394
error = C(spec.bg1):blend(C(spec.diag.error), 0.15):to_css(),
9495
warn = C(spec.bg1):blend(C(spec.diag.warn), 0.15):to_css(),
9596
info = C(spec.bg1):blend(C(spec.diag.info), 0.15):to_css(),
9697
hint = C(spec.bg1):blend(C(spec.diag.hint), 0.15):to_css(),
98+
ok = C(spec.bg1):blend(C(spec.diag.ok), 0.15):to_css(),
9799
}
98100

99101
spec.diff = {

lua/nightfox/spec.lua

+2
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ local template = require("nightfox.util.template")
4949
---@field warn string
5050
---@field info string
5151
---@field hint string
52+
---@field ok string
5253

5354
---@class SpecDiagnosticBg
5455
---@field error string
5556
---@field warn string
5657
---@field info string
5758
---@field hint string
59+
---@field ok string
5860

5961
---@class SpecDiff
6062
---@field add string

misc/feline.lua

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ local function generate_pallet_from_colorscheme()
9797
info = { hl = "DiagnosticInfo", default = color_map.blue.default },
9898
warn = { hl = "DiagnosticWarn", default = color_map.yellow.default },
9999
error = { hl = "DiagnosticError", default = color_map.red.default },
100+
ok = { hl = "DiagnosticOk", default = color_map.green.default },
100101
}
101102

102103
local pallet = {}

usage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,12 @@ The `syntax` table maps [palette] color values to syntax values to be used by th
347347
#### spec.diag
348348

349349
The `diag` table maps [palette] colors to vim diagnostic colors values.
350-
These values are: `error`, `warn`, `info` and `hint`.
350+
These values are: `error`, `warn`, `info`, `hint`, and `ok`.
351351

352352
#### spec.diag_bg
353353

354354
The `diag_bg` table maps [palette] colors to vim diagnostic background colors.
355-
These values are: `error`, `warn`, `info` and `hint`.
355+
These values are: `error`, `warn`, `info`, `hint`, and `ok`.
356356

357357
#### spec.diff
358358

0 commit comments

Comments
 (0)