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:
parent
697f855e11
commit
d9e162a82a
@ -1,3 +1,3 @@
|
||||
# NinjaVim
|
||||
|
||||
> Level 999 neovim setup.
|
||||
> Level 9999 neovim setup.
|
||||
|
12
.config/nvim/lua/sameer/core/auto-save.lua
Normal file
12
.config/nvim/lua/sameer/core/auto-save.lua
Normal 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
|
||||
}
|
@ -1,2 +1,5 @@
|
||||
require("sameer.core.keymaps")
|
||||
require("sameer.core.options")
|
||||
|
||||
-- custom auto commands
|
||||
require("sameer.core.auto-save").setup()
|
||||
|
@ -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" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -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 = {
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user