mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
feat(ui): allow to get the highlight namespace
This commit is contained in:
@@ -637,3 +637,19 @@ describe('API: get highlight', function()
|
||||
eq({link ='Foo', default = true}, meths.get_hl(0, {name = 'Bar'}))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('API: set/get highlight namespace', function()
|
||||
it('set/get highlight namespace', function()
|
||||
eq(0, meths.get_hl_ns({}))
|
||||
local ns = meths.create_namespace('')
|
||||
meths.set_hl_ns(ns)
|
||||
eq(ns, meths.get_hl_ns({}))
|
||||
end)
|
||||
|
||||
it('set/get window highlight namespace', function()
|
||||
eq(-1, meths.get_hl_ns({winid = 0}))
|
||||
local ns = meths.create_namespace('')
|
||||
meths.win_set_hl_ns(0, ns)
|
||||
eq(ns, meths.get_hl_ns({winid = 0}))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user