From 71fef2899236773e0746a84ea04c5aae6fae7f96 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Fri, 4 Jul 2025 17:57:04 +0200 Subject: [PATCH] fix: get rid of which-key depreciation warning in checkhealth --- lua/weeheavy/plugins/which-key.lua | 73 ++++++++++++------------------ 1 file changed, 28 insertions(+), 45 deletions(-) diff --git a/lua/weeheavy/plugins/which-key.lua b/lua/weeheavy/plugins/which-key.lua index f361723..af5184f 100644 --- a/lua/weeheavy/plugins/which-key.lua +++ b/lua/weeheavy/plugins/which-key.lua @@ -1,47 +1,30 @@ return { - "folke/which-key.nvim", - --event = { "BufReadPre", "BufNewFile" }, - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 250 - end, - opts = { - spec = { - { "d", group = "diagnostics" }, - { "f", group = "find shite" }, - { "g", group = "git things" }, - { "gl", desc = "git logg" }, - { "q", desc = "trouble (this buffer)" }, - }, - notify = false, -- disable warnings for mappings - win = { - wo = { - winblend = 15, - }, - }, - expand = 3, -- expand groups when <= n mappings - }, - config = function(_, opts) - local wk = require("which-key") - wk.setup(opts) - --wk.register(opts.defaults) - wk.register(opts.spec) - - --wk.add({ - -- { "d", group = "diagnostics" }, - -- { "f", group = "find shite" }, - -- { "g", group = "git things" }, - -- { "gl", desc = "git logg" }, - -- { "q", desc = "trouble (this buffer)" }, - -- --{ "ff", "Telescope find_files", desc = "Find File", mode = "n" }, - -- { - -- "fb", - -- function() - -- print("hello") - -- end, - -- desc = "Foobar", - -- }, - --}) - end, + "folke/which-key.nvim", + --event = { "BufReadPre", "BufNewFile" }, + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 250 + end, + opts = { + spec = { + { "d", group = "diagnostics" }, + { "f", group = "find shite" }, + { "g", group = "git things" }, + { "gl", desc = "git logg" }, + { "q", desc = "trouble (this buffer)" }, + }, + notify = false, -- disable warnings for mappings + win = { + wo = { + winblend = 15, + }, + }, + expand = 3, -- expand groups when <= n mappings + }, + config = function(_, opts) + local wk = require("which-key") + wk.setup(opts) + wk.add(opts.spec) + end, }