-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
apilibnvim, Nvim RPC APIlibnvim, Nvim RPC API
Description
Neovim version (nvim -v)
NVIM v0.8.0-dev+432-gfa4b0c3ba
How to reproduce the issue
-- cterm value tests
-- Set Normal via lua api, get value
vim.api.nvim_set_hl(0, "Normal", {ctermfg = 16, ctermbg = 231})
vim.pretty_print("nvim_set_hl normal", vim.api.nvim_get_hl_by_name("Normal", false))
-- FAIL => {true = 6}
-- Normal group has some special handling sometimes, so check another group
-- but set the values = Normal
vim.api.nvim_set_hl(0, "NotNormal", {ctermfg = 16, ctermbg = 231})
vim.pretty_print("nvim_set_hl not-normal = normal", vim.api.nvim_get_hl_by_name("NotNormal", false))
-- FAIL => {true = 6}
-- Check another group but set values to NOT normal
vim.api.nvim_set_hl(0, "NotNormal", {ctermfg = 61, ctermbg = 132})
vim.pretty_print("nvim_set_hl not-normal", vim.api.nvim_get_hl_by_name("NotNormal", false))
-- OK => {background = 132, foreground = 61}
-- set via classic method
vim.cmd("hi Normal ctermfg=16 ctermbg=231")
vim.pretty_print("hi normal", vim.api.nvim_get_hl_by_name("Normal", false))
-- FAIL => {true = 6}
--
vim.cmd("hi NotNormal ctermfg=16 ctermbg=231")
vim.pretty_print("hi not-normal = normal", vim.api.nvim_get_hl_by_name("NotNormal", false))
-- FAIL => {true = 6}
vim.cmd("hi NotNormal ctermfg=17 ctermbg=18")
vim.pretty_print("hi not-normal", vim.api.nvim_get_hl_by_name("NotNormal", false))
-- OK => {background = 18, foreground = 17}
vim.pretty_print("default comment", vim.api.nvim_get_hl_by_name("Comment", false))
-- OK => {foreground = 14}See also #18024 (comment)
Iron-E
Metadata
Metadata
Assignees
Labels
apilibnvim, Nvim RPC APIlibnvim, Nvim RPC API