Add autosave plugin and CTRL+s keybind for toggling it

This commit is contained in:
Jiří Štefka 2022-10-03 01:04:40 +02:00
parent 1adf2cd349
commit 36ffb2131f

@ -236,6 +236,9 @@ local config = {
["<leader>xs"] = { "<cmd>VimtexToggleMain<cr>", desc = "Set current file as 'current project'" }, ["<leader>xs"] = { "<cmd>VimtexToggleMain<cr>", desc = "Set current file as 'current project'" },
["<leader>xa"] = { "<cmd>VimtexContextMenu<cr>", desc = "Show context menu" }, ["<leader>xa"] = { "<cmd>VimtexContextMenu<cr>", desc = "Show context menu" },
-- Autosave
["<C-s>"] = { "<cmd>ASToggle<cr>", desc = "Toggle autosave" },
-- quick save -- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command -- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
}, },
@ -274,6 +277,12 @@ local config = {
"iamcco/markdown-preview.nvim", "iamcco/markdown-preview.nvim",
run = function() vim.fn["mkdp#util#install"]() end, run = function() vim.fn["mkdp#util#install"]() end,
}, },
{
"Pocco81/auto-save.nvim",
config = function()
require("auto-save").setup()
end,
},
-- We also support a key value style plugin definition similar to NvChad: -- We also support a key value style plugin definition similar to NvChad:
-- ["ray-x/lsp_signature.nvim"] = { -- ["ray-x/lsp_signature.nvim"] = {