return { "folke/which-key.nvim", event = "VeryLazy", init = function() vim.o.timeout = true vim.o.timeoutlen = 500 end, config = function() local wk = require("which-key") wk.add({ { "n", group = "vim", icon = "" }, { "nh", "nohl", desc = "Close Search Highlights", icon = "" }, { "no", "foldopen", desc = "Open Fold", icon = "" }, { "nc", "foldclose", desc = "Close Fold", icon = "" }, { "s", group = "splits", icon = "󱓡" }, { "sv", "v", desc = "Split vertical", icon = "" }, { "sh", "s", desc = "Split horizontal", icon = "" }, { "se", "=", desc = "Make Splits equal", icon = "󰤼" }, { "sx", "close", desc = "Close Split", icon = "󰅚" }, { "i", group = "interface", icon = "󰮫" }, { "il", "Lazy", desc = "Open Lazy Menu" }, { "im", "Mason", desc = "Open Mason Menu" }, { "ie", "VenvSelect", desc = "Python Virtual Environment Selector" }, { "p", group = "typst", icon = "" }, { "pc", "!typst c %", desc = "Compile current file", icon = "" }, { "pw", function() if _G.typst_job_id then vim.notify("Typst watch is already running!", vim.log.levels.WARN) return end _G.typst_job_id = vim.fn.jobstart({ "typst", "w", vim.fn.expand("%") }) vim.notify("Typst watch started in background", vim.log.levels.INFO) end, desc = "Watch current file", icon = "", }, { "ps", function() if _G.typst_job_id then vim.fn.jobstop(_G.typst_job_id) _G.typst_job_id = nil vim.notify("Typst watch stopped", vim.log.levels.INFO) else vim.notify("No Typst job running", vim.log.levels.WARN) end end, desc = "Stop watch current file", icon = "", }, }) end, }