nvim: cursorline off by default, add ui toggle

This commit is contained in:
Daniel Lundin 2025-02-02 12:20:40 +01:00
parent 4df4b83d45
commit 6e81863ff6
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
2 changed files with 17 additions and 11 deletions

View file

@ -14,10 +14,12 @@ local colors = {
comment = hsl(360, 66, 40), comment = hsl(360, 66, 40),
comment_error = hsl(2, 85, 40), comment_error = hsl(2, 85, 40),
diagnostic_error = hsl(347, 80, 45), suggestion = hsl(220, 95, 60),
diagnostic_warning = hsl(30, 100, 50),
diagnostic_info = hsl(145, 80, 30), -- diagnostic_error = hsl(347, 80, 45),
diagnostic_hint = hsl(145, 80, 30), -- diagnostic_warning = hsl(30, 100, 50),
-- diagnostic_info = hsl(145, 80, 30),
-- diagnostic_hint = hsl(145, 80, 30),
popup_error_bg = hsl(0, 90, 99), popup_error_bg = hsl(0, 90, 99),
popup_warning_bg = hsl(27, 90, 99), popup_warning_bg = hsl(27, 90, 99),
@ -59,6 +61,8 @@ local colors = {
member = hsl(213, 45, 75), member = hsl(213, 45, 75),
punc = hsl(213, 45, 50), punc = hsl(213, 45, 50),
suggestion = hsl(158, 66, 40),
diagnostic_error = hsl(353, 100, 45), diagnostic_error = hsl(353, 100, 45),
diagnostic_warning = hsl(30, 100, 50), diagnostic_warning = hsl(30, 100, 50),
diagnostic_info = hsl(176, 80, 60), diagnostic_info = hsl(176, 80, 60),
@ -88,8 +92,6 @@ local colors = {
doc_bg = hsl(220, 80, 10), doc_bg = hsl(220, 80, 10),
doc_fg = hsl(200, 30, 60), doc_fg = hsl(200, 30, 60),
suggestion = hsl(180, 55, 40),
}, },
} }
@ -118,8 +120,8 @@ local setupGroups = function(c)
Search = { bg = c.search_bg, fg = c.search_fg }, Search = { bg = c.search_bg, fg = c.search_fg },
CurSearch = { link = "Search" }, CurSearch = { link = "Search" },
Comment = { fg = c.comment, italic = true, bold = true }, Comment = { fg = c.comment, italic = true },
CommentError = { fg = c.comment_error, italic = true, bold = true }, CommentError = { fg = c.comment_error, italic = true },
["@comment.note"] = { link = "Comment" }, ["@comment.note"] = { link = "Comment" },
["@comment.todo"] = { link = "CommentError" }, ["@comment.todo"] = { link = "CommentError" },
["@comment.error"] = { link = "CommentError" }, ["@comment.error"] = { link = "CommentError" },
@ -207,7 +209,9 @@ local setupGroups = function(c)
BlinkCmpSignatureHelp = { link = 'BlinkCmpDoc' }, BlinkCmpSignatureHelp = { link = 'BlinkCmpDoc' },
BlinkCmpSignatureHelpBorder = { link = 'BlinkCmpDocBorder' }, BlinkCmpSignatureHelpBorder = { link = 'BlinkCmpDocBorder' },
NeoCodeiumSuggestion = { fg = c.suggestion, bold = true, italic = true }, BlinkCmpGhostText = { fg = c.suggestion, italic = true, bold = true },
NeoCodeiumSuggestion = { link = 'BlinkCmpGhostText' },
LspReferenceText = { fg = c.highlight_intense, undercurl = true }, LspReferenceText = { fg = c.highlight_intense, undercurl = true },
LspInlayHint = { fg = c.accent1, italic = true, bold = true }, LspInlayHint = { fg = c.accent1, italic = true, bold = true },
} }

View file

@ -5,8 +5,9 @@ vim.g.maplocalleader = ","
-- UI -- UI
vim.opt.cursorline = true vim.opt.cursorline = false
vim.opt.guicursor = "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175" vim.opt.guicursor =
"n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175"
vim.opt.laststatus = 0 vim.opt.laststatus = 0
vim.opt.number = false vim.opt.number = false
vim.opt.relativenumber = false vim.opt.relativenumber = false
@ -205,5 +206,6 @@ vim.keymap.set("n", "<Leader>uc", function()
end, opts("Toggle Dieter colors")) end, opts("Toggle Dieter colors"))
vim.keymap.set("n", "<Leader>uf", "<cmd>ToggleAutoFormat<cr>", opts("Toggle autoformat on save")) vim.keymap.set("n", "<Leader>uf", "<cmd>ToggleAutoFormat<cr>", opts("Toggle autoformat on save"))
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>ul", "<cmd>set invcursorline<cr>", opts("Toggle cursor line"))
vim.keymap.set("n", "<Leader>un", "<cmd>set invnumber<cr>", opts("Toggle line numbers")) 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"))