diff --git a/README.md b/README.md index 81fc596..5ef5185 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,23 @@ Install the plugin with your favourite package manager: +
+ Lazy.nvim + +```lua +{ + "okuuva/auto-save.nvim", + cmd = "ASToggle", -- optional for lazy loading on command + event = { "InsertLeave", "TextChanged" } -- optional for lazy loading on trigger events + opts = { + -- your config goes here + -- or just leave it empty :) + }, +}, +``` + +
+
Packer.nvim @@ -122,6 +139,19 @@ Additionally you may want to set up a key mapping to toggle auto-save: vim.api.nvim_set_keymap("n", "n", ":ASToggle", {}) ``` +or as part of the `lazy.nvim` plugin spec: + +```lua +{ + "okuuva/auto-save.nvim", + keys = { + { "n", ":ASToggle", desc = "Toggle auto-save" }, + }, + ... +}, + +``` +   ### 🪴 Usage