summaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorKyren223 <ulmliad223@gmail.com>2024-06-29 00:47:22 +0300
committerKyren223 <ulmliad223@gmail.com>2024-06-29 00:47:22 +0300
commit132502fe3438c3a660e55e44e09712e00e27342f (patch)
tree07f437c18778aeeb35cb2c7f711b91c90a9c6bd7 /.config/nvim/lua
parent641cb5f0b6346fa208d0348d4609e40eb1bfc696 (diff)
Modified nvim config, added which-key and fixed telescope keys not working
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/options.lua2
-rw-r--r--.config/nvim/lua/plugins/telescope.lua4
-rw-r--r--.config/nvim/lua/plugins/which-key.lua9
3 files changed, 11 insertions, 4 deletions
diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua
index f55703d..7dc37d8 100644
--- a/.config/nvim/lua/options.lua
+++ b/.config/nvim/lua/options.lua
@@ -31,6 +31,4 @@ vim.opt.smartcase = true
-- Misc
vim.opt.scrolloff = 8
vim.opt.undofile = true
-vim.opt.updatetime = 250
-vim.opt.timeoutlen = 300 -- Displays which-key sooner, once that's setupped
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', '<leader>fs', builtin.builtin, { desc = '[F]ind [S]elect Telescope' })
vim.keymap.set('n', '<leader>fw', builtin.grep_string, { desc = '[F]ind current [W]ord' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = '[F]ind by [G]rep' })
+ vim.keymap.set('n', '<leader>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', '<leader>s', builtin.lsp_document_symbols, { desc = "Show [S]tructure" })
+ vim.keymap.set('n', '<leader>s', builtin.lsp_workspace_symbols, { desc = "Show [S]tructure" })
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" })
vim.keymap.set('n', '<M-Enter>', vim.lsp.buf.code_action, { desc = "Code Actions" })
- vim.keymap.set('n', '<leader>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,
+}
+