Nvim : Add a base for custom hl config.
This commit is contained in:
parent
f9aedf962e
commit
8db6f1ad05
|
@ -45,6 +45,7 @@ in {
|
||||||
./module/config/Etc.nix
|
./module/config/Etc.nix
|
||||||
./module/config/Search.nix
|
./module/config/Search.nix
|
||||||
./module/config/Tab.nix
|
./module/config/Tab.nix
|
||||||
|
./module/config/Highlight.nix
|
||||||
./module/plugin/Filetree.nix
|
./module/plugin/Filetree.nix
|
||||||
./module/plugin/Gruvbox.nix
|
./module/plugin/Gruvbox.nix
|
||||||
./module/plugin/Bufferline.nix
|
./module/plugin/Bufferline.nix
|
||||||
|
|
16
home/config/nvim/module/config/Highlight.nix
Normal file
16
home/config/nvim/module/config/Highlight.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, ... }: let
|
||||||
|
cfg = config.style.color;
|
||||||
|
|
||||||
|
bg = cfg.bg.regular;
|
||||||
|
in {
|
||||||
|
# TODO: Create a function to set group color.
|
||||||
|
text = ''
|
||||||
|
vim.api.nvim_create_autocmd({"ColorScheme", "VimEnter"}, {
|
||||||
|
group = vim.api.nvim_create_augroup('Color', {}),
|
||||||
|
pattern = "*",
|
||||||
|
callback = function ()
|
||||||
|
vim.api.nvim_set_hl(0, "CursorLine", { bg = "#${bg}" })
|
||||||
|
end
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
|
@ -17,7 +17,9 @@
|
||||||
'NormalFloat',
|
'NormalFloat',
|
||||||
},
|
},
|
||||||
-- table: groups you don't want to clear
|
-- table: groups you don't want to clear
|
||||||
exclude_groups = {},
|
exclude_groups = {
|
||||||
|
'CursorLine',
|
||||||
|
},
|
||||||
-- function: code to be executed after highlight groups are cleared
|
-- function: code to be executed after highlight groups are cleared
|
||||||
-- Also the user event "TransparentClear" will be triggered
|
-- Also the user event "TransparentClear" will be triggered
|
||||||
on_clear = function() end,
|
on_clear = function() end,
|
||||||
|
|
Loading…
Reference in a new issue