about summary refs log tree commit diff stats
path: root/hm
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-27 20:49:20 +0200
committerSoispha <soispha@vhack.eu>2023-08-27 20:49:20 +0200
commit71a8ee4189ae1d02f269fe758e770282a6cbb11b (patch)
tree02cf7c9997828cd6bd7b597b631d104bdf7d1b91 /hm
parentFeat(hm/conf/nvim/plugins/comment-nvim): Init (diff)
downloadnixos-config-71a8ee4189ae1d02f269fe758e770282a6cbb11b.tar.gz
nixos-config-71a8ee4189ae1d02f269fe758e770282a6cbb11b.zip
Fix(hm/conf/nvim/plugins/todo-comments): Add default highlighting
Diffstat (limited to '')
-rw-r--r--hm/soispha/conf/nvim/plugins/colorscheme/lua/mk_todos_readable.lua22
1 files changed, 17 insertions, 5 deletions
diff --git a/hm/soispha/conf/nvim/plugins/colorscheme/lua/mk_todos_readable.lua b/hm/soispha/conf/nvim/plugins/colorscheme/lua/mk_todos_readable.lua
index 0145ec19..ee28151c 100644
--- a/hm/soispha/conf/nvim/plugins/colorscheme/lua/mk_todos_readable.lua
+++ b/hm/soispha/conf/nvim/plugins/colorscheme/lua/mk_todos_readable.lua
@@ -1,5 +1,17 @@
-local opts = { bg = "NONE"; fg = "fg"; }
-vim.api.nvim_set_hl(0, "@text.danger", opts)
-vim.api.nvim_set_hl(0, "@text.note", opts)
-vim.api.nvim_set_hl(0, "@text.todo", opts)
-vim.api.nvim_set_hl(0, "@text.warning", opts)
+local opts = { bg = "NONE"; bold = true; }
+
+
+---@param hl_group string: The name of the hl group
+---@param extra_opts table: Extra options to pass to nvim_set_hl
+local set_hl = function(hl_group, extra_opts)
+  local local_opts = vim.deepcopy(opts);
+  for k, v in ipairs(extra_opts) do
+    local_opts[k] = v;
+  end
+  vim.api.nvim_set_hl(0, hl_group, local_opts)
+end
+
+set_hl("@text.danger", { fg = "red"; })
+set_hl("@text.note", { fg = "blue"; })
+set_hl("@text.todo", { fg = "green"; })
+set_hl("@text.warning", { fg = "yellow"; })