Skip to content

Commit b172e43

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

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-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/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)