From 6e81863ff6928a0b13fc32bd3dc0c82b1d20ff1e Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Sun, 2 Feb 2025 12:20:40 +0100
Subject: [PATCH] nvim: cursorline off by default, add ui toggle

---
 home/common/nvim/dieter/lua/dieter/init.lua | 22 ++++++++++++---------
 home/common/nvim/init.lua                   |  6 ++++--
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/home/common/nvim/dieter/lua/dieter/init.lua b/home/common/nvim/dieter/lua/dieter/init.lua
index 2aa86d7..07a47f5 100644
--- a/home/common/nvim/dieter/lua/dieter/init.lua
+++ b/home/common/nvim/dieter/lua/dieter/init.lua
@@ -14,10 +14,12 @@ local colors = {
     comment = hsl(360, 66, 40),
     comment_error = hsl(2, 85, 40),
 
-    diagnostic_error = hsl(347, 80, 45),
-    diagnostic_warning = hsl(30, 100, 50),
-    diagnostic_info = hsl(145, 80, 30),
-    diagnostic_hint = hsl(145, 80, 30),
+    suggestion = hsl(220, 95, 60),
+
+    -- diagnostic_error = hsl(347, 80, 45),
+    -- 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_warning_bg = hsl(27, 90, 99),
@@ -59,6 +61,8 @@ local colors = {
     member = hsl(213, 45, 75),
     punc = hsl(213, 45, 50),
 
+    suggestion = hsl(158, 66, 40),
+
     diagnostic_error = hsl(353, 100, 45),
     diagnostic_warning = hsl(30, 100, 50),
     diagnostic_info = hsl(176, 80, 60),
@@ -88,8 +92,6 @@ local colors = {
 
     doc_bg = hsl(220, 80, 10),
     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 },
     CurSearch = { link = "Search" },
 
-    Comment = { fg = c.comment, italic = true, bold = true },
-    CommentError = { fg = c.comment_error, italic = true, bold = true },
+    Comment = { fg = c.comment, italic = true },
+    CommentError = { fg = c.comment_error, italic = true },
     ["@comment.note"] = { link = "Comment" },
     ["@comment.todo"] = { link = "CommentError" },
     ["@comment.error"] = { link = "CommentError" },
@@ -207,7 +209,9 @@ local setupGroups = function(c)
     BlinkCmpSignatureHelp = { link = 'BlinkCmpDoc' },
     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 },
     LspInlayHint = { fg = c.accent1, italic = true, bold = true },
   }
diff --git a/home/common/nvim/init.lua b/home/common/nvim/init.lua
index 8beaaaf..67f0c25 100644
--- a/home/common/nvim/init.lua
+++ b/home/common/nvim/init.lua
@@ -5,8 +5,9 @@ vim.g.maplocalleader = ","
 
 -- UI
 
-vim.opt.cursorline = true
-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.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.laststatus = 0
 vim.opt.number = false
 vim.opt.relativenumber = false
@@ -205,5 +206,6 @@ vim.keymap.set("n", "<Leader>uc", function()
 end, opts("Toggle Dieter colors"))
 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>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>uw", "<cmd>set invwrap<cr>", opts("Toggle line wrapping"))