aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/keybinds.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/keybinds.lua')
-rw-r--r--.config/nvim/lua/keybinds.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua
index 372335a..b017716 100644
--- a/.config/nvim/lua/keybinds.lua
+++ b/.config/nvim/lua/keybinds.lua
@@ -2,6 +2,7 @@ local telescope = require("telescope.builtin")
local wk = require("which-key")
local ufo = require("ufo")
local nt_api = require("nvim-tree.api")
+local spider = require("spider")
vim.g.mapleader = " "
@@ -23,6 +24,7 @@ vim.keymap.set("n", "<Leader>f", telescope.find_files)
vim.keymap.set("n", "<Leader><TAB>", telescope.buffers)
vim.keymap.set("n", "<Leader>D", telescope.lsp_definitions)
vim.keymap.set("n", "<Leader>R", telescope.lsp_references)
+vim.keymap.set("n", "<Leader>S", telescope.lsp_document_symbols)
vim.keymap.set("n", "<Leader>m", ":MinimapToggle<CR>")
vim.keymap.set("n", "<Leader>b", ":Gitsigns blame_line<CR>")
@@ -36,12 +38,18 @@ vim.keymap.set("n", "<Leader>[", ufo.openAllFolds)
vim.keymap.set("n", "<Leader>]", ufo.closeAllFolds)
vim.keymap.set("n", "<Leader>r", vim.lsp.buf.rename)
+vim.keymap.set({ "n"; "o"; "x" }, "W", function() spider.motion("w") end)
+vim.keymap.set({ "n"; "o"; "x" }, "E", function() spider.motion("e") end)
+vim.keymap.set({ "n"; "o"; "x" }, "B", function() spider.motion("b") end)
+vim.keymap.set({ "n"; "o"; "x" }, "gE", function() spider.motion("ge") end)
+
vim.opt.whichwrap = "<,>,h,l,[,]"
wk.register({
["<CR>"] = "Quick Action";
["K"] = "Hover";
["D"] = "Definition";
+ ["S"] = "Symbols";
["F"] = "Format";
["f"] = "Find files";
["<TAB>"] = "Show buffers";