Update nvim/lua/config.lua

Signed-off-by: subcrip <contact@subc.rip>
This commit is contained in:
subcrip 2024-10-21 18:23:22 +08:00
parent 0f3c50fa23
commit 6c7a2f30a2
1 changed files with 12 additions and 6 deletions

View File

@ -1,5 +1,9 @@
vim.cmd("set encoding=utf-8")
vim.cmd("set exrc")
vim.cmd("set undofile")
vim.cmd("set undodir=~/.vim/undofiles")
vim.cmd("set undolevels=10000")
vim.cmd("set undoreload=50000")
vim.cmd("filetype off")
vim.cmd("set pumblend=40")
vim.cmd("set winblend=40")
@ -151,12 +155,12 @@ local plugins = {
{
'jdhao/better-escape.vim' -- `jk` without causing `j` to have delay
},
{
'Pocco81/auto-save.nvim',
opts = {
enabled = true,
}
},
-- {
-- 'Pocco81/auto-save.nvim',
-- opts = {
-- enabled = true,
-- }
-- },
{
"windwp/nvim-autopairs",
event = "InsertEnter",
@ -787,6 +791,8 @@ vim.keymap.set('n', '<leader>x', require("mini.trailspace").trim, {noremap=true}
vim.keymap.set('n', '<Del>', vim.notify.dismiss, {noremap=true})
vim.keymap.set({'n', 'v', 'x'}, 'Q', 'q', {noremap=true})
vim.keymap.set({'n', 'v', 'x'}, 'q', '<Nop>', {noremap=true})
vim.keymap.set('n', 'g ', [[/\v^\s+$<CR>$<Cmd>nohlsearch<CR>]], {noremap=true, silent=true})
vim.keymap.set('n', 'gy', "`[v`]", {noremap=true})
vim.api.nvim_create_user_command('SearchInCurrentFile', function()
vim.ui.input({ prompt = 'Grep ...'}, function(input)