diff --git a/config/nvim/lua/fs/autocmds.lua b/config/nvim/lua/fs/autocmds.lua index d75e536..e30050d 100644 --- a/config/nvim/lua/fs/autocmds.lua +++ b/config/nvim/lua/fs/autocmds.lua @@ -10,23 +10,6 @@ autocmd({'BufNewFile', 'BufRead'}, { command = "setlocal path+=~/.config/nvim/lua includeexpr=substitute(v:fname,'\\\\.','/','g')" }) -autocmd('InsertEnter', { - desc = 'Disable `cursorline` when entering Insert mode.', - group = id, - pattern = '*', - callback = function(args) - vim.w.had_cursorline = vim.opt.cursorline:get() - vim.opt.cursorline = false - end -}) - -autocmd('InsertLeave', { - desc = 'Enable `cursorline` when leaving Insert mode (if it was set before entering).', - group = id, - pattern = '*', - callback = function(args) vim.opt.cursorline = vim.w.had_cursorline end -}) - autocmd('TextYankPost', { desc = 'Briefly highlight yanked text.', group = id, diff --git a/config/nvim/lua/fs/options.lua b/config/nvim/lua/fs/options.lua index 1f9bfc8..80887e2 100644 --- a/config/nvim/lua/fs/options.lua +++ b/config/nvim/lua/fs/options.lua @@ -66,7 +66,8 @@ set_options { wrap = false, -- don't wrap long lines initially textwidth = 79, -- maximum width for text being inserted colorcolumn = '+1', -- highlight column after 'textwidth' - cursorline = true, -- highlight the line of the cursor + cursorline = true, -- highlight the line of the cursor... + cursorlineopt = 'number',-- ...but only the line number showbreak = '⤷ ', -- prefix for wrapped lines scrolloff = 3, -- min. # of lines above and below cursor sidescrolloff = 3, -- min. # of columns to left and right of cursor