vim: only highlight number of current line
This commit is contained in:
parent
c1bea90524
commit
0b7989d4ab
2 changed files with 2 additions and 18 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue