From 36ffb2131f28d862834ebe93e1fb9a7dfb8b3fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 3 Oct 2022 01:04:40 +0200 Subject: [PATCH] Add autosave plugin and CTRL+s keybind for toggling it --- init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init.lua b/init.lua index b4070ea..f981ab0 100644 --- a/init.lua +++ b/init.lua @@ -236,6 +236,9 @@ local config = { ["xs"] = { "VimtexToggleMain", desc = "Set current file as 'current project'" }, ["xa"] = { "VimtexContextMenu", desc = "Show context menu" }, + -- Autosave + [""] = { "ASToggle", desc = "Toggle autosave" }, + -- quick save -- [""] = { ":w!", desc = "Save File" }, -- change description but the same command }, @@ -274,6 +277,12 @@ local config = { "iamcco/markdown-preview.nvim", 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: -- ["ray-x/lsp_signature.nvim"] = {