nvim: Add spider plugin for better web key movement

Improves the 'subword' and punctuation jumps of the w/e/b keys, by
adhering to snake_case and CamelCase words and jumping to subparts of
them, as well as ignoring 'useless' punctuation when jumping.
This commit is contained in:
Marty Oehme 2025-12-11 20:39:05 +01:00
parent 585a48ff94
commit 23cb8d32e5
Signed by: Marty
GPG key ID: 4E535BC19C61886E
2 changed files with 11 additions and 0 deletions

View file

@ -74,6 +74,7 @@
"nvim-lint": { "branch": "master", "commit": "f126af5345c7472e9a0cdbe1d1a29209be72c4c4" },
"nvim-lspconfig": { "branch": "master", "commit": "77d3fdfb3554632c7a3b101ded643d422de7626f" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-spider": { "branch": "main", "commit": "fed9f683db005e6eb676e11a615b0e249a21142e" },
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },

View file

@ -2,6 +2,16 @@ return {
-- surround things with other things using ys/cs/ds
{ "kylechui/nvim-surround", config = true, event = { "CursorHold", "InsertEnter" } },
-- more intelligent w/e/b key jumps including CamelCase, snake_case words and
-- ignoring some punctuation
{
"chrisgrieser/nvim-spider",
keys = {
{ "w", "<cmd>lua require('spider').motion('w')<CR>", mode = { "n", "o", "x" } },
{ "e", "<cmd>lua require('spider').motion('e')<CR>", mode = { "n", "o", "x" } },
{ "b", "<cmd>lua require('spider').motion('b')<CR>", mode = { "n", "o", "x" } },
},
},
-- jump between letters with improved fFtT quicksearch, mimics sneak
{
"folke/flash.nvim",