From ac910375d67906a94f44c3445fd5cbed578fd47b Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Tue, 3 Dec 2024 09:14:23 +0100 Subject: [PATCH] feat(nvim): replace vim-wordmotion with nvim-spider --- nvimrc | 4 +++- vim/lua/spider_config.lua | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 vim/lua/spider_config.lua diff --git a/nvimrc b/nvimrc index 436ca0f..a88be23 100644 --- a/nvimrc +++ b/nvimrc @@ -293,7 +293,9 @@ packadd! fzf.vim " https://github.com/junegunn/fzf.vim.git packadd! vim-surround " https://github.com/tpope/vim-surround.git packadd! vim-rhubarb " https://github.com/tpope/vim-rhubarb.git packadd! editorconfig-vim " https://github.com/editorconfig/editorconfig-vim.git -packadd! vim-wordmotion " https://github.com/chaoren/vim-wordmotion.git + +packadd! nvim-spider " https://github.com/chrisgrieser/nvim-spider.git +lua require "spider_config" " projectionist packadd! vim-projectionist " https://github.com/tpope/vim-projectionist.git diff --git a/vim/lua/spider_config.lua b/vim/lua/spider_config.lua new file mode 100644 index 0000000..842839b --- /dev/null +++ b/vim/lua/spider_config.lua @@ -0,0 +1,20 @@ +require('spider').setup({}) + +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" } +)