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 {
"folke/which-key.nvim",
--event = { "BufReadPre", "BufNewFile" },
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 250
end,
opts = {
spec = {
{ "<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)" },
},
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({
-- { "<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,
"folke/which-key.nvim",
--event = { "BufReadPre", "BufNewFile" },
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 250
end,
opts = {
spec = {
{ "<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)" },
},
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,
}