summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2025-12-24 10:03:40 +0300
committerA Farzat <a@farzat.xyz>2025-12-24 10:03:40 +0300
commitc9cff1392eec8686d76a1761efb7c67be87578f9 (patch)
tree4135c471de78038cacd16ad051bf3dfb307d64dd
parent9837a6954a2e0235c0ad9b37e8b9f0edffd08a36 (diff)
downloaddotfiles-master.tar.gz
dotfiles-master.zip
Change colorscheme managementHEADmaster
This reflects updates in neovim and/or other software or plugins.
-rw-r--r--.config/nvim/plugin-settings/indent-blankline.lua68
-rw-r--r--.config/nvim/regular.vim2
2 files changed, 53 insertions, 17 deletions
diff --git a/.config/nvim/plugin-settings/indent-blankline.lua b/.config/nvim/plugin-settings/indent-blankline.lua
index a0f1096..2797156 100644
--- a/.config/nvim/plugin-settings/indent-blankline.lua
+++ b/.config/nvim/plugin-settings/indent-blankline.lua
@@ -1,27 +1,63 @@
-vim.api.nvim_set_hl(0, "IblScope", { ctermfg = "Gray" })
-vim.api.nvim_set_hl(0, "IblWhitespace", { ctermfg = "DarkGray" })
-vim.api.nvim_set_hl(0, "RainbowRed", { ctermfg = "Red" })
-vim.api.nvim_set_hl(0, "RainbowYellow", { ctermfg = "Yellow" })
-vim.api.nvim_set_hl(0, "RainbowBlue", { ctermfg = "Blue" })
-vim.api.nvim_set_hl(0, "RainbowGreen", { ctermfg = "Green" })
-vim.api.nvim_set_hl(0, "RainbowMagenta", { ctermfg = "Magenta" })
-vim.api.nvim_set_hl(0, "RainbowCyan", { ctermfg = "Cyan" })
-
local highlight = {
"RainbowRed",
"RainbowYellow",
"RainbowBlue",
+ "RainbowOrange",
"RainbowGreen",
- "RainbowMagenta",
+ "RainbowViolet",
"RainbowCyan",
}
-require("ibl").setup {
- indent = {
- char = "›",
- highlight = highlight,
- },
-}
+--- Replace undercurls with underlines as tmux does not show undercurls
+local function replace_undercurl_with_underline()
+ local hlg = vim.api.nvim_get_hl(0, { link = true })
+ for name, attributes in pairs(hlg) do
+ if attributes.undercurl then
+ attributes.undercurl = false
+ attributes.underline = true
+ vim.api.nvim_set_hl(0, name, attributes)
+ end
+ end
+end
+
+--- Remove the background attribute from the given highlight group
+-- @param name string
+local function remove_background(name)
+ local attributes = vim.api.nvim_get_hl(0, { name = name })
+ if attributes.bg then
+ local without_bg = {}
+ for k, v in pairs(attributes) do
+ if k ~= "bg" then
+ without_bg[k] = v
+ end
+ end
+ vim.api.nvim_set_hl(0, name, without_bg)
+ end
+end
+
+local hooks = require("ibl.hooks")
+-- create the highlight groups in the highlight setup hook, so they are reset
+-- every time the colorscheme changes
+hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
+ remove_background("Normal")
+ remove_background("EndOfBuffer")
+ replace_undercurl_with_underline() -- as tmux does not show undercurls
+ vim.api.nvim_set_hl(0, "NonText", { fg = "DarkGray" })
+ vim.api.nvim_set_hl(0, "Whitespace", { fg = "DarkGray" })
+ vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
+ vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
+ vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
+ vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
+ vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
+ vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
+ vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
+end)
+
+vim.g.rainbow_delimiters = { highlight = highlight }
+
+hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
+
+require("ibl").setup { indent = { char = "›", highlight = highlight, }, }
vim.opt.list = true
vim.opt.listchars = {
diff --git a/.config/nvim/regular.vim b/.config/nvim/regular.vim
index 9f907df..ff7b720 100644
--- a/.config/nvim/regular.vim
+++ b/.config/nvim/regular.vim
@@ -9,7 +9,7 @@ set number
set relativenumber
" Use the wal colorscheme from the plugin if available.
-colorscheme wal
+colorscheme industry
" Add a red column after textwidth limit.
set colorcolumn=+1