Black spot between register symbol and register content.
dharmx opened this issue · comments
Please select which platform you are using
Linux
Was this something which used to work for you, and then stopped?
I never saw this working
Describe the bug
See the following image.
Now, when I add these lines onto registers.nvim/lua/registers.lua
it kind of gets fixed. Except the background of the register symbol section (Notice how the background is slightly lighter than that of the cursor line). I have tried changing some highlighting groups but to no avail.
-- Define the matches and link them
-- vim.cmd([[syntax match RegistersNumber "\d\+"]])
vim.cmd([[syntax match RegistersNumber "[-+]\?\d\+\.\?\d*"]])
vim.api.nvim_set_hl(namespace, "RegistersNumber", { link = "Number" })
vim.cmd([[syntax region RegistersString start=+"+ skip=+\\"+ end=+"+ oneline]])
vim.cmd([[syntax region RegistersString start=+'+ skip=+\\'+ end=+'+ oneline]])
vim.api.nvim_set_hl(namespace, "RegistersString", { link = "String" })
-- these lines
vim.api.nvim_set_hl(namespace, "SignColumn", { link = "NormalFloat" })
vim.api.nvim_set_hl(namespace, "CursorLineSign", { link = "CursorLine" })
I do not know if this is intentional. Kinda looked weird to me.
Neovim version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Setup
local ok, registers = pcall(require, "registers")
if not ok then return end
registers.setup({
symbols = {
newline = "",
space = " ",
tab = ">",
register_type_charwise = "",
register_type_linewise = "",
register_type_blockwise = "",
},
window = {
max_width = 100,
highlight_cursorline = true,
border = "solid",
transparency = 0,
},
sign_highlights = {
cursorline = "Visual",
selection = "Constant",
default = "Function",
unnamed = "Statement",
read_only = "Type",
expression = "Exception",
black_hole = "Error",
alternate_buffer = "Operator",
last_search = "Tag",
delete = "Special",
yank = "Delimiter",
history = "Number",
named = "Todo",
},
})
local namespace = vim.api.nvim_get_namespaces()["registers"]
if not namespace then return end
vim.api.nvim_set_hl(namespace, "SignColumn", { link = "NormalFloat" })
vim.api.nvim_set_hl(namespace, "CursorLineSign", { link = "CursorLine" })
Did this for the moment.
Thanks for that, it would be much apprecisted if you make a PR adding it to the highlights yoy can set.
Okay! I'll do that.