From b231183c13dda17d8cb119e9501507df9fc8c781 Mon Sep 17 00:00:00 2001 From: Liam Jackson Date: Sun, 4 May 2025 15:31:42 -0400 Subject: [PATCH] Entry added to README for LazyVim/Snacks-toggle spec - Vimade spec in LazyVim grammar, also incorporates Snacks.nvim - Configuration for Snacks-toggle integrates Vimade with which-key --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index 8ec19dc..c037273 100644 --- a/README.md +++ b/README.md @@ -363,6 +363,40 @@ buffers. You can also fade around the active scope and mark areas that won't be require('lazy').setup({spec = {'tadaa/vimade', event = 'VeryLazy'}}) ``` +- If you are a user of **[LazyVim](https://github.com/LazyVim/LazyVim)**, as of v13.x, Folke's comprehensive [Snacks.nvim](https://github.com/folke/snacks.nvim) is integrated and offers many quality of life features. One such feature is [Snacks-toggle](https://github.com/folke/snacks.nvim/blob/main/docs/toggle.md) integration: + + _::lua::LazyVim::_ + + ```lua + return { + "tadaa/vimade", + event = "VeryLazy", + dependencies = { + "folke/snacks.nvim", + opts = { + toggle = {}, + }, + }, + opts = function(_, opts) + opts.recipe = { "ripple", { animate = false } } + opts.checkinterval = 500 + + Snacks.toggle({ + name = "Vimade", + get = function() + return vim.g.vimade_running == 1 + end, + ---@diagnostic disable-next-line: unused-local + set = function(state) + vim.cmd("VimadeToggle") + end, + }):map("uv") + + return opts + end, + } + ``` + - For **Vim** or more granular control, enable `vimade.lazy` and call `vimade#Load()`:   *::vimscript::*