summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/settings.lua
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-09-06 14:24:03 +0200
committerJoe <rrbo@proton.me>2023-09-06 14:24:03 +0200
commit85be102c2615e14a6ed8825bfc232ee672fd4aa2 (patch)
tree58ecb8796e9eeaf5e6e9ab25cfea04563ffb6578 /.config/nvim/lua/settings.lua
parentup (diff)
downloaddotfiles-bsd-85be102c2615e14a6ed8825bfc232ee672fd4aa2.tar.gz
dotfiles-bsd-85be102c2615e14a6ed8825bfc232ee672fd4aa2.tar.bz2
dotfiles-bsd-85be102c2615e14a6ed8825bfc232ee672fd4aa2.tar.xz
dotfiles-bsd-85be102c2615e14a6ed8825bfc232ee672fd4aa2.tar.zst
dotfiles-bsd-85be102c2615e14a6ed8825bfc232ee672fd4aa2.zip
up
Diffstat (limited to '')
-rw-r--r--.config/nvim/lua/settings.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
index 992f96d..238caea 100644
--- a/.config/nvim/lua/settings.lua
+++ b/.config/nvim/lua/settings.lua
@@ -25,12 +25,14 @@ vim.opt.ruler = true
vim.opt.tabstop = 4
vim.opt.textwidth = 80
vim.opt.timeoutlen = 0
+vim.opt.timeoutlen = 250
vim.opt.undodir = '/tmp/nvim_undo'
vim.opt.undofile = true
vim.opt.wildmode = 'longest,list,full'
vim.opt.directory = '/tmp/nvim_swap'
+vim.o.ignorecase = true
+vim.o.smartcase = true
vim.opt.wrap = true
-vim.opt.textwidth = 0
vim.cmd [[
syntax on
filetype plugin indent on
@@ -44,3 +46,11 @@ autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
vim.g.mapleader = '\\'
vim.g.maplocalleader = '\\'
vim.g['battery#update_statusline'] = 1
+local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
+vim.api.nvim_create_autocmd('TextYankPost', {
+ callback = function()
+ vim.highlight.on_yank()
+ end,
+ group = highlight_group,
+ pattern = '*',
+})