nvim: colors

This commit is contained in:
Daniel Lundin 2025-01-11 23:29:02 +01:00
parent 2cd4b5c52a
commit b5a3d0ec9e
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
2 changed files with 11 additions and 14 deletions

View file

@ -44,18 +44,17 @@ local colors = {
accent2 = hsl(40, 57, 57), -- Yellow accent2 = hsl(40, 57, 57), -- Yellow
dimmed = hsl(212, 19, 25), dimmed = hsl(212, 19, 25),
-- dimmed_subtle = hsl(212, 19, 70),
dimmed_subtle = hsl(212, 19, 50), dimmed_subtle = hsl(212, 19, 50),
highlight_subtle = hsl(212, 27, 11), highlight_subtle = hsl(212, 27, 11),
highlight = hsl(212, 27, 18),
highlight_intense = hsl(58, 100, 60), highlight_intense = hsl(58, 100, 60),
dialog_fg = hsl(191, 15, 75), dialog_fg = hsl(191, 15, 75),
-- string = hsl(96, 35, 60), string = hsl(90, 30, 60),
-- string = hsl(80, 79, 83), -- comment = hsl(2, 69, 68),
string = hsl(90, 45, 70), comment = hsl(216, 30, 55),
comment = hsl(2, 69, 68),
comment_error = hsl(2, 85, 50), comment_error = hsl(2, 85, 50),
func = hsl(40, 57, 87), func = hsl(40, 57, 87),
member = hsl(213, 45, 75), member = hsl(213, 45, 75),
@ -78,7 +77,7 @@ local colors = {
delete = hsl(350, 100, 40), delete = hsl(350, 100, 40),
delete_quarter = hsl(350, 100, 15), delete_quarter = hsl(350, 100, 15),
selection = hsl(218, 30, 20), selection = hsl(218, 90, 20),
search_bg = hsl(43, 100, 8), search_bg = hsl(43, 100, 8),
search_fg = hsl(43, 100, 85), search_fg = hsl(43, 100, 85),
@ -138,13 +137,11 @@ local setupGroups = function(c)
GitSignsDeleteNr = { link = "DiffDelete" }, GitSignsDeleteNr = { link = "DiffDelete" },
-- Treesitter -- Treesitter
-- ["@function"] = { link = "NormalNC" },
["@punctuation.special"] = { fg = c.punc }, ["@punctuation.special"] = { fg = c.punc },
["@special"] = { link = "NormalNC" }, ["@special"] = { link = "NormalNC" },
["@variable"] = { link = "NormalNC" }, ["@variable"] = { link = "NormalNC" },
["@variable.member"] = { fg = c.member }, ["@variable.member"] = { fg = c.member },
["@variable.parameter"] = { fg = c.accent2 }, ["@variable.parameter"] = { fg = c.accent2 },
-- ["@lsp.type.variable"] = { fg = c.dimmed_subtle, italic = true },
-- UI Elements -- UI Elements
CursorLine = { bg = c.highlight_subtle }, CursorLine = { bg = c.highlight_subtle },
@ -166,8 +163,8 @@ local setupGroups = function(c)
LineNr = { fg = c.dimmed }, LineNr = { fg = c.dimmed },
CursorLineNr = { fg = c.dimmed_subtle, bg = c.highlight_subtle }, CursorLineNr = { fg = c.dimmed_subtle, bg = c.highlight_subtle },
IndentLine = { fg = c.dimmed }, IndentLine = { fg = c.highlight },
IndentLineCurrent = { fg = c.dimmed_subtle }, IndentLineCurrent = { fg = c.highlight },
MiniIndentscopeSymbol = { link = "IndentLine" }, MiniIndentscopeSymbol = { link = "IndentLine" },
MiniIndentscopeSymbolOff = { link = "IndentLine" }, MiniIndentscopeSymbolOff = { link = "IndentLine" },
@ -239,7 +236,7 @@ local setupGroupsNoColor = function(c)
g["@variable"] = cl g["@variable"] = cl
g["@variable.member"] = cl g["@variable.member"] = cl
g["@variable.parameter"] = cl g["@variable.parameter"] = cl
g.Comment = { fg = c.dimmed_subtle, italic = true, bold = true } -- g.Comment = { fg = c.dimmed_subtle, italic = true, bold = true }
g.CommentError = { link = "Comment" } g.CommentError = { link = "Comment" }
return g return g
end end

View file

@ -7,7 +7,7 @@ vim.g.maplocalleader = ","
vim.opt.cursorline = true vim.opt.cursorline = true
vim.opt.laststatus = 0 vim.opt.laststatus = 0
vim.opt.number = true vim.opt.number = false
vim.opt.relativenumber = false vim.opt.relativenumber = false
vim.opt.ruler = true vim.opt.ruler = true
vim.opt.syntax = "on" vim.opt.syntax = "on"
@ -26,7 +26,6 @@ end
function CondensedPath() function CondensedPath()
local path = vim.fn.expand("%:p") local path = vim.fn.expand("%:p")
-- path = vim.fn.fnamemodify(path, ':p')
local home = os.getenv("HOME") local home = os.getenv("HOME")
if home then if home then
path = vim.fn.substitute(path, '^' .. home, '~', '') path = vim.fn.substitute(path, '^' .. home, '~', '')
@ -43,7 +42,7 @@ function CondensedPath()
return vim.fn.pathshorten(early_path) .. '/' .. late_path return vim.fn.pathshorten(early_path) .. '/' .. late_path
end end
vim.opt.rulerformat = "%50(%=%{%v:lua.GetIndicators()%}%#Label#%#MsgArea#| %{%v:lua.CondensedPath()%}%)" vim.opt.rulerformat = "%50(%=%{%v:lua.GetIndicators()%}%#MsgArea#%{%v:lua.CondensedPath()%}%)%7(%l:%c%)"
-- Search -- Search
vim.opt.ignorecase = true vim.opt.ignorecase = true
@ -179,4 +178,5 @@ vim.keymap.set("n", "<Leader>uc", function()
end end
end, opts("Toggle Dieter colors")) end, opts("Toggle Dieter colors"))
vim.keymap.set("n", "<Leader>uh", "<cmd>InlayHintsToggle<cr>", opts("Toggle inlay hints")) vim.keymap.set("n", "<Leader>uh", "<cmd>InlayHintsToggle<cr>", opts("Toggle inlay hints"))
vim.keymap.set("n", "<Leader>un", "<cmd>set invnumber<cr>", opts("Toggle line numbers"))
vim.keymap.set("n", "<Leader>uw", "<cmd>set invwrap<cr>", opts("Toggle line wrapping")) vim.keymap.set("n", "<Leader>uw", "<cmd>set invwrap<cr>", opts("Toggle line wrapping"))