feat(nvim): replace vim-wordmotion with nvim-spider

This commit is contained in:
Rob Watson 2024-12-03 09:14:23 +01:00
parent ea32b61f86
commit ac910375d6
2 changed files with 23 additions and 1 deletions

4
nvimrc
View File

@ -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-surround " https://github.com/tpope/vim-surround.git
packadd! vim-rhubarb " https://github.com/tpope/vim-rhubarb.git packadd! vim-rhubarb " https://github.com/tpope/vim-rhubarb.git
packadd! editorconfig-vim " https://github.com/editorconfig/editorconfig-vim.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 " projectionist
packadd! vim-projectionist " https://github.com/tpope/vim-projectionist.git packadd! vim-projectionist " https://github.com/tpope/vim-projectionist.git

20
vim/lua/spider_config.lua Normal file
View File

@ -0,0 +1,20 @@
require('spider').setup({})
vim.keymap.set(
{ "n", "o", "x" },
"w",
"<cmd>lua require('spider').motion('w')<CR>",
{ desc = "Spider-w" }
)
vim.keymap.set(
{ "n", "o", "x" },
"e",
"<cmd>lua require('spider').motion('e')<CR>",
{ desc = "Spider-e" }
)
vim.keymap.set(
{ "n", "o", "x" },
"b",
"<cmd>lua require('spider').motion('b')<CR>",
{ desc = "Spider-b" }
)