diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 2e80abc..93ec34f 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,5 +1,5 @@ -require("plugin-manager") require("options") require("keymaps") require("autocmds") +require("plugin-manager") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 4af5e40..3b12496 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -22,10 +22,10 @@ "nvim-treesitter": { "branch": "master", "commit": "2e9c346aefda680bd14ebf40a50c2897fd637bc2" }, "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, - "smartyank.nvim": { "branch": "master", "commit": "d9e078fe08d6466e37ea45ac446a9f60e6866789" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" }, "tokyonight.nvim": { "branch": "main", "commit": "81c867c5f638597a82c82094dcb90ed42444dabc" }, - "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" } + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, + "which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" } } \ No newline at end of file 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', '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, +} +