fix: get rid of which-key depreciation warning in checkhealth

This commit is contained in:
Oliver Ladner 2025-07-04 17:57:04 +02:00
commit 71fef28992

View file

@ -1,47 +1,30 @@
return { return {
"folke/which-key.nvim", "folke/which-key.nvim",
--event = { "BufReadPre", "BufNewFile" }, --event = { "BufReadPre", "BufNewFile" },
event = "VeryLazy", event = "VeryLazy",
init = function() init = function()
vim.o.timeout = true vim.o.timeout = true
vim.o.timeoutlen = 250 vim.o.timeoutlen = 250
end, end,
opts = { opts = {
spec = { spec = {
{ "<leader>d", group = "diagnostics" }, { "<leader>d", group = "diagnostics" },
{ "<leader>f", group = "find shite" }, { "<leader>f", group = "find shite" },
{ "<leader>g", group = "git things" }, { "<leader>g", group = "git things" },
{ "<leader>gl", desc = "git logg" }, { "<leader>gl", desc = "git logg" },
{ "<leader>q", desc = "trouble (this buffer)" }, { "<leader>q", desc = "trouble (this buffer)" },
}, },
notify = false, -- disable warnings for mappings notify = false, -- disable warnings for mappings
win = { win = {
wo = { wo = {
winblend = 15, winblend = 15,
}, },
}, },
expand = 3, -- expand groups when <= n mappings expand = 3, -- expand groups when <= n mappings
}, },
config = function(_, opts) config = function(_, opts)
local wk = require("which-key") local wk = require("which-key")
wk.setup(opts) wk.setup(opts)
--wk.register(opts.defaults) wk.add(opts.spec)
wk.register(opts.spec) end,
--wk.add({
-- { "<leader>d", group = "diagnostics" },
-- { "<leader>f", group = "find shite" },
-- { "<leader>g", group = "git things" },
-- { "<leader>gl", desc = "git logg" },
-- { "<leader>q", desc = "trouble (this buffer)" },
-- --{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find File", mode = "n" },
-- {
-- "<leader>fb",
-- function()
-- print("hello")
-- end,
-- desc = "Foobar",
-- },
--})
end,
} }