From 35db9f7cedbf83c424603f6bb1a5f25df807b592 Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Tue, 19 Nov 2024 12:09:27 +0700 Subject: [PATCH] snacks: delegate many of the configuration to lazyvim --- lazy-lock.json | 1 + lazyvim.json | 3 ++- lua/plugins/snacks.lua | 40 ---------------------------------------- 3 files changed, 3 insertions(+), 41 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index dc5c01d..e6f0fdb 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,6 +4,7 @@ "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, "SchemaStore.nvim": { "branch": "main", "commit": "a7ad1f6205500d1369382e2e43df4e60eeae7cb6" }, "advanced-git-search.nvim": { "branch": "main", "commit": "1c5a10f5c838cfad2c17d7464311d6fb416cb319" }, + "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, "arrow.nvim": { "branch": "master", "commit": "5438c977e729a29d96bd54c8da3103154e80dbd1" }, "before.nvim": { "branch": "master", "commit": "187bafe2792a82d53cdb632971e4113cd703ac53" }, "blink.cmp": { "branch": "main", "commit": "8fb9d72ee4e7ce79144df48dad9d58e102053bd3" }, diff --git a/lazyvim.json b/lazyvim.json index a6b5ba1..76658e1 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -2,10 +2,11 @@ "extras": [ "lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.lang.toml", + "lazyvim.plugins.extras.ui.alpha", "lazyvim.plugins.extras.vscode" ], "news": { - "NEWS.md": "7107" + "NEWS.md": "7429" }, "version": 7 } \ No newline at end of file diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index d573830..dad9e54 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -1,15 +1,5 @@ return { "folke/snacks.nvim", - priority = 1000, - lazy = false, - opts = { - bigfile = { enabled = true }, - notifier = { enabled = false }, - quickfile = { enabled = true }, - statuscolumn = { enabled = true }, - words = { enabled = true }, - git = { enabled = true }, - }, keys = { { "z", "lua Snacks.lazygit()", desc = "LazyGit" }, { "bd", "lua Snacks.bufdelete()", desc = "(Snacks) Delete Buffer" }, @@ -28,34 +18,4 @@ return { desc = "Prev Reference", }, }, - init = function() - vim.api.nvim_create_autocmd("User", { - pattern = "VeryLazy", - callback = function() - -- Setup some globals for debugging (lazy-loaded) - _G.dd = function(...) - Snacks.debug.inspect(...) - end - _G.bt = function() - Snacks.debug.backtrace() - end - vim.print = _G.dd -- Override print to use snacks for `:=` command - - -- Create some toggle mappings - Snacks.toggle.option("spell", { name = "Spelling" }):map "us" - Snacks.toggle.option("wrap", { name = "Wrap" }):map "uw" - Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map "uL" - Snacks.toggle.diagnostics():map "ud" - Snacks.toggle.line_number():map "ul" - Snacks.toggle - .option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }) - :map "uc" - Snacks.toggle.treesitter():map "uT" - Snacks.toggle - .option("background", { off = "light", on = "dark", name = "Dark Background" }) - :map "ub" - Snacks.toggle.inlay_hints():map "uh" - end, - }) - end, }