diff --git a/.gitmodules b/.gitmodules index 9161680..3626595 100644 --- a/.gitmodules +++ b/.gitmodules @@ -129,3 +129,7 @@ path = pack/general/start/nvim-surround url = https://github.com/kylechui/nvim-surround branch = main +[submodule "pack/general/start/nvim-spider"] + path = pack/general/start/nvim-spider + url = https://github.com/chrisgrieser/nvim-spider + branch = main diff --git a/init.lua b/init.lua index ee4b83c..b224d78 100644 --- a/init.lua +++ b/init.lua @@ -612,3 +612,11 @@ vim.diagnostic.config({ ---- nvim-surround require("nvim-surround").setup() + +--- nvim-spider +-- we need to use the ex-command version to cal the commands to allow dot repeatability +-- see: https://github.com/chrisgrieser/nvim-spider#installation +vim.keymap.set({ "n", "o", "x" }, "w", "lua require('spider').motion('w')", { desc = "Spider-w" }) +vim.keymap.set({ "n", "o", "x" }, "e", "lua require('spider').motion('e')", { desc = "Spider-e" }) +vim.keymap.set({ "n", "o", "x" }, "b", "lua require('spider').motion('b')", { desc = "Spider-b" }) +vim.keymap.set({ "n", "o", "x" }, "ge", "lua require('spider').motion('ge')", { desc = "Spider-ge" }) diff --git a/pack/general/start/nvim-spider b/pack/general/start/nvim-spider new file mode 160000 index 0000000..be72738 --- /dev/null +++ b/pack/general/start/nvim-spider @@ -0,0 +1 @@ +Subproject commit be7273858d75673a0ae594552742eb8769f35d6a