Neovim: Add rainbow-mode, improve diffview colors
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
"neogit": { "branch": "master", "commit": "0d0879b0045fb213c328126969a3317c0963d34a" },
|
||||
"nvim-base16": { "branch": "master", "commit": "b3e9ec6a82c05b562cd71f40fe8964438a9ba64a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d5b6d4366dfd7a1071b930defd365e6d0be258de" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "adf72368f6af026b4cd19851d34a313a54159857" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "7f00d94543f1fd37cab2afa2e9a6cd54e1c6b9ef" },
|
||||
|
||||
@@ -44,6 +44,7 @@ vim.opt.shadafile = vim.fn.stdpath("cache") .. "/netrwhist"
|
||||
vim.opt.colorcolumn = "81"
|
||||
vim.opt.completeopt = "menuone,noselect"
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.fillchars = vim.opt.fillchars + "diff:╱"
|
||||
vim.opt.showtabline = 0
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.title = true
|
||||
|
||||
@@ -26,6 +26,7 @@ return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
|
||||
"sindrets/diffview.nvim", -- diff integration
|
||||
-- { "sindrets/diffview.nvim", opts = { enhanced_diff_hl = true } }, -- diff integration
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
|
||||
+25
-3
@@ -13,22 +13,38 @@ return {
|
||||
vim.cmd.colorscheme "base16-tomorrow-night"
|
||||
|
||||
local colors = require("base16-colorscheme").colors
|
||||
-- local blue_m1 = "#9cc4e6"
|
||||
local blue = colors.base0D -- #81a2be
|
||||
-- local blue_p1 = "#5f819d"
|
||||
local blue_p2 = "#445666"
|
||||
local blue_p3 = "#2a3640"
|
||||
local cyan = colors.base0C -- #8abeb7
|
||||
local fg = colors.base05 -- #c5c8c6
|
||||
local green_dark = "#8c9440"
|
||||
local fg_dark = "#515151"
|
||||
-- local green = colors.base0B -- #b5bd68
|
||||
local green_p1 = "#8c9440"
|
||||
-- local green_p2 = "#5f875f"
|
||||
local green_bg = "#404324"
|
||||
-- local orange = colors.base09 -- #de935f
|
||||
-- local magenta = colors.base0E -- #b294bb
|
||||
local red = colors.base08 -- #cc6666
|
||||
local red_bg = "#4e2626"
|
||||
local yellow = colors.base0A -- #f0c674
|
||||
|
||||
-- Cursor
|
||||
vim.api.nvim_command("highlight CursorLineNr guifg=" .. yellow .. " gui=bold")
|
||||
-- Diffview
|
||||
vim.api.nvim_command("highlight DiffviewDiffAdd guibg=" .. green_bg)
|
||||
vim.api.nvim_command("highlight DiffviewDiffChange guibg=" .. blue_p3) -- Unchanged part on a change line
|
||||
vim.api.nvim_command("highlight DiffviewDiffDelete guibg=" .. red_bg .. " guifg=" .. fg_dark)
|
||||
vim.api.nvim_command("highlight DiffviewDiffText guibg=" .. blue_p2) -- Changed part on a change line
|
||||
-- Git gutter
|
||||
vim.api.nvim_command("highlight GitSignsAdd guifg=" .. green_dark)
|
||||
vim.api.nvim_command("highlight GitSignsAdd guifg=" .. green_p1)
|
||||
vim.api.nvim_command("highlight GitSignsChange guifg=" .. yellow)
|
||||
-- Rainbow delimiters
|
||||
vim.api.nvim_command("highlight RainbowDelimiterBlue guifg=" .. blue)
|
||||
vim.api.nvim_command("highlight RainbowDelimiterCyan guifg=" .. cyan)
|
||||
vim.api.nvim_command("highlight RainbowDelimiterGreen guifg=" .. green_dark)
|
||||
vim.api.nvim_command("highlight RainbowDelimiterGreen guifg=" .. green_p1)
|
||||
vim.api.nvim_command("highlight RainbowDelimiterOrange guifg=" .. fg)
|
||||
vim.api.nvim_command("highlight RainbowDelimiterRed guifg=" .. red)
|
||||
vim.api.nvim_command("highlight RainbowDelimiterYellow guifg=" .. yellow)
|
||||
@@ -154,4 +170,10 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- Rainbow-mode
|
||||
{ -- https://github.com/norcalli/nvim-colorizer.lua
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
opts = {},
|
||||
}, -- :ColorizerToggle
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user