From e1dec1ee53181cd7f70c2ba76e093797cda35386 Mon Sep 17 00:00:00 2001 From: pro100ton Date: Sat, 1 Feb 2025 11:50:28 +0300 Subject: [PATCH] Add which_key plugin --- lua/custom/plugins/which_key.lua | 20 ++++++++++++++++++++ lua/custom/trouble.lua | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/which_key.lua diff --git a/lua/custom/plugins/which_key.lua b/lua/custom/plugins/which_key.lua new file mode 100644 index 0000000..f2cff19 --- /dev/null +++ b/lua/custom/plugins/which_key.lua @@ -0,0 +1,20 @@ +return { + "folke/which-key.nvim", + -- Telling nvim that it can load this plugin later, and that it is not + -- that important for initial UI + event = "VeryLazy", + -- Function that will run while neovim startup instead of when plugin is actualy loads + init = function() + -- How long which-key will wait until activation + vim.o.timeout = true + vim.o.timeoutlen = 500 + end, + -- Options that will pass to setup function, but we are leaving it empty to use + -- default configuration + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } +} + diff --git a/lua/custom/trouble.lua b/lua/custom/trouble.lua index 019be4f..e22abbc 100644 --- a/lua/custom/trouble.lua +++ b/lua/custom/trouble.lua @@ -14,9 +14,9 @@ vim.keymap.set("n", "xL", "Trouble loclist toggle", { desc = "L vim.keymap.set("n", "xQ", "Trouble qflist toggle", { desc = "Quickfix List (Trouble)" }) -- Telescope integration -local actions = require("telescope.actions") +-- local actions = require("telescope.actions") local open_with_trouble = require("trouble.sources.telescope").open -local add_to_trouble = require("trouble.sources.telescope").add +-- local add_to_trouble = require("trouble.sources.telescope").add require("telescope").setup({ defaults = {