mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 02:17:09 +10:00
bufhl: support creating new groups
This commit is contained in:
@@ -24,7 +24,8 @@ describe('Buffer highlighting', function()
|
||||
[6] = {foreground = Screen.colors.DarkCyan}, -- Identifier
|
||||
[7] = {bold = true},
|
||||
[8] = {underline = true, bold = true, foreground = Screen.colors.SlateBlue},
|
||||
[9] = {foreground = Screen.colors.SlateBlue, underline = true}
|
||||
[9] = {foreground = Screen.colors.SlateBlue, underline = true},
|
||||
[10] = {foreground = Screen.colors.Red}
|
||||
})
|
||||
curbuf = request('nvim_get_current_buf')
|
||||
end)
|
||||
@@ -255,4 +256,32 @@ describe('Buffer highlighting', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('works with new syntax groups', function()
|
||||
insert([[
|
||||
fancy code in a new fancy language]])
|
||||
add_hl(-1, "FancyLangItem", 0, 0, 5)
|
||||
screen:expect([[
|
||||
fancy code in a new fancy languag^e |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]])
|
||||
|
||||
command('hi FancyLangItem guifg=red')
|
||||
screen:expect([[
|
||||
{10:fancy} code in a new fancy languag^e |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user