1
0
mirror of https://github.com/sameer1612/.dotfiles.git synced 2024-11-27 08:20:51 +02:00

added auto save on buffer change

This commit is contained in:
Sameer Kumar 2023-10-03 10:58:58 +05:30
parent 697f855e11
commit d9e162a82a
6 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,3 @@
# NinjaVim
> Level 999 neovim setup.
> Level 9999 neovim setup.

View File

@ -0,0 +1,12 @@
-- autosave file when switching buffer
return {
setup = function()
vim.cmd([[
augroup AutoSaveOnBufferSwitch
autocmd!
autocmd BufLeave * silent! w
augroup END
]])
end
}

View File

@ -1,2 +1,5 @@
require("sameer.core.keymaps")
require("sameer.core.options")
-- custom auto commands
require("sameer.core.auto-save").setup()

View File

@ -10,8 +10,17 @@ return {
sections = {
lualine_x = {
{ "datetime" },
{ "fileformat" },
{ "filetype" },
{
require("noice").api.status.mode.get,
cond = require("noice").api.status.mode.has,
color = { fg = "#ff9e64" },
},
{
require("noice").api.status.search.get,
cond = require("noice").api.status.search.has,
color = { fg = "#ff9e64" },
},
},
},
})

View File

@ -14,7 +14,7 @@ return {
command_palette = true,
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = false,
lsp_doc_border = true,
},
},
dependencies = {