Skip to content

Commit 3c95ed3

Browse files
authored
Merge pull request #286 from projekt0n/feat/highlight-blend
feat: Implement highlight-blend feature
2 parents c2d20c2 + bf24744 commit 3c95ed3

File tree

5 files changed

+33
-13
lines changed

5 files changed

+33
-13
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10+
### What's New?
11+
12+
- Implement [highlight-blend](https://neovim.io/doc/user/syntax.html#highlight-blend) feature #251
13+
14+
### Changes
15+
16+
-
17+
18+
### Issues Fix
19+
20+
-
21+
1022
## [v1.0.1] - 23 July 2023
1123

1224
### What's New?

Usage.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,14 @@ These values are: `add`, `removed`, `changed`, `conflict`, and `ignored`.
365365
A `group` is the definition of a `highlight-group`. The key of the group table is the `highlight-group` that will be defined, and the table value is the
366366
arguments to the |:highlight| command.
367367

368-
| Key | Help | Description |
369-
| ----- | ------------------- | ---------------------------------------------------------- |
370-
| fg | \|highlight-guifg\| | The color value of the foreground of the highlight group |
371-
| bg | \|highlight-guibg\| | The color value of the background of the highlight group |
372-
| sp | \|highlight-guisp\| | The color for underlines and undercurls |
373-
| style | \|highlight-gui\| | The style of the highlight group. Ex `italic`, `bold`, etc |
374-
| link | \|highlight-link\| | Link one `highlight-group` to another |
368+
| Key | Help | Description |
369+
| ----- | ------------------- | ---------------------------------------------------------------------------------------- |
370+
| fg | \|highlight-guifg\| | The color value of the foreground of the highlight group |
371+
| bg | \|highlight-guibg\| | The color value of the background of the highlight group |
372+
| sp | \|highlight-guisp\| | The color for underlines and undercurls |
373+
| blend | \|highlight-blend\| | Override the blend level for a highlight group within the popupmenu or floating windows. |
374+
| style | \|highlight-gui\| | The style of the highlight group. Ex `italic`, `bold`, etc |
375+
| link | \|highlight-link\| | Link one `highlight-group` to another |
375376

376377
If the value of `link` is present and is not empty, github theme will link the group to the corresponding value.
377378

doc/github-nvim-theme.txt

+7-5
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ A `group` is the definition of a `highlight-group`. The key of the group table
449449
is the `highlight-group` that will be defined, and the table value is the
450450
arguments to the |:highlight| command.
451451

452-
------------------------------------------------------------------------------
452+
-----------------------------------------------------------------------------------
453453
Key Help Description
454-
------- ------------------- --------------------------------------------------
454+
------- ------------------- -------------------------------------------------------
455455
fg |highlight-guifg| The color value of the foreground of the highlight
456456
group
457457

@@ -460,11 +460,13 @@ arguments to the |:highlight| command.
460460

461461
sp |highlight-guisp| The color for underlines and undercurls
462462

463-
style |highlight-gui| The style of the highlight group. Ex italic, bold,
464-
etc
463+
blend |highlight-blend| Override the blend level for a highlight group within
464+
the popupmenu or floating windows.
465+
466+
style |highlight-gui| The style of the highlight group. Ex italic, bold, etc
465467

466468
link |highlight-link| Link one highlight-group to another
467-
------------------------------------------------------------------------------
469+
-----------------------------------------------------------------------------------
468470
If the value of `link` is present and is not empty, github theme will link the
469471
group to the corresponding value.
470472

lua/github-theme/lib/compiler.lua

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ vim.o.background = "%s"
5959
op.bg = values.bg
6060
op.fg = values.fg
6161
op.sp = values.sp
62+
op.blend = values.blend
6263
table.insert(lines, fmt([[h(0, "%s", %s)]], name, inspect(op)))
6364
end
6465
end

lua/github-theme/util/template.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ function M.parse(template, spec)
3737
if type(opts) == 'table' then
3838
local new = {}
3939
for key, value in pairs(opts) do
40-
new[key] = parse_string(value, spec)
40+
if type(value) == 'string' then
41+
new[key] = parse_string(value, spec)
42+
elseif type(value) == 'number' then
43+
new[key] = value
44+
end
4145
end
4246
result[group] = new
4347
else

0 commit comments

Comments
 (0)