From 132502fe3438c3a660e55e44e09712e00e27342f Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sat, 29 Jun 2024 00:47:22 +0300 Subject: Modified nvim config, added which-key and fixed telescope keys not working --- .config/nvim/lua/plugins/telescope.lua | 4 ++-- .config/nvim/lua/plugins/which-key.lua | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/lua/plugins/which-key.lua (limited to '.config/nvim/lua/plugins') diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 73ac032..350b926 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -12,14 +12,14 @@ return { vim.keymap.set('n', 'fs', builtin.builtin, { desc = '[F]ind [S]elect Telescope' }) vim.keymap.set('n', 'fw', builtin.grep_string, { desc = '[F]ind current [W]ord' }) vim.keymap.set('n', 'fg', builtin.live_grep, { desc = '[F]ind by [G]rep' }) + vim.keymap.set('n', 'f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' }) vim.keymap.set('n', 'gh', vim.lsp.buf.hover, { desc = "[G]oto [H]over" }) vim.keymap.set('n', 'gd', builtin.lsp_definitions, { desc = "[G]oto [D]efinition" }) vim.keymap.set('n', 'gu', builtin.lsp_references, { desc = "[G]oto [U]sages" }) - vim.keymap.set('n', 's', builtin.lsp_document_symbols, { desc = "Show [S]tructure" }) + vim.keymap.set('n', 's', builtin.lsp_workspace_symbols, { desc = "Show [S]tructure" }) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" }) vim.keymap.set('n', '', vim.lsp.buf.code_action, { desc = "Code Actions" }) - vim.keymap.set('n', 'f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' }) end }, { diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua new file mode 100644 index 0000000..001f9ee --- /dev/null +++ b/.config/nvim/lua/plugins/which-key.lua @@ -0,0 +1,9 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 500 + end, +} + -- cgit v1.3.1