From f5679cac13df1bce7a062c88b260eefebd21016a Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 11 Aug 2024 16:37:13 +0900 Subject: feat(keymaps, pack): subword movements --- fnl/nvrc/keymaps.fnl | 10 ++++++++++ fnl/nvrc/pack.fnl | 2 ++ lazy-lock.json | 2 ++ 3 files changed, 14 insertions(+) diff --git a/fnl/nvrc/keymaps.fnl b/fnl/nvrc/keymaps.fnl index e8838c2..846b98e 100644 --- a/fnl/nvrc/keymaps.fnl +++ b/fnl/nvrc/keymaps.fnl @@ -84,6 +84,16 @@ (map! [n] :l (vim.diagnostic.open_float nil {:focus false})) (map! [n] :b ((. (require :dap) :toggle_breakpoint))) +;; subword movements +; nvim-spider +(map! [nox] :w ((. (require :spider) :motion) :w)) +(map! [nox] :e ((. (require :spider) :motion) :e)) +(map! [nox] :b ((. (require :spider) :motion) :b)) + +; nvim-various-textobjs +(map! [ox] :aw ((. (require :various-textobjs) :subword) :outer)) +(map! [ox] :iw ((. (require :various-textobjs) :subword) :inner)) + ;; Helix-like movements (map! [nv] :gh :0) (map! [nv] :gl "$") diff --git a/fnl/nvrc/pack.fnl b/fnl/nvrc/pack.fnl index bd7d0ae..7c2a8fa 100644 --- a/fnl/nvrc/pack.fnl +++ b/fnl/nvrc/pack.fnl @@ -54,5 +54,7 @@ (pack! :ggandor/leap.nvim {:req :leap :keys [:s :S]}) (pack! :windwp/nvim-autopairs {:req :autopairs :event :InsertEnter}) (pack! :kylechui/nvim-surround {:init :nvim-surround :event :InsertEnter}) +(pack! :chrisgrieser/nvim-spider {:config {:skipInsignificantPunctuation false} :lazy true}) +(pack! :chrisgrieser/nvim-various-textobjs {:lazy true}) (unpack!) diff --git a/lazy-lock.json b/lazy-lock.json index 4435f2a..9497e00 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -23,10 +23,12 @@ "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, "nvim-lspconfig": { "branch": "master", "commit": "6c505d4220b521f3b0e7b645f6ce45fa914d0eed" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, + "nvim-spider": { "branch": "main", "commit": "508b3504a350fb9a93bd0b7c0d41b8b5fc732b5e" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, "nvim-treesitter": { "branch": "master", "commit": "c79b068f395817c39ed147d4ee76855c36b846e6" }, "nvim-treesitter-refactor": { "branch": "master", "commit": "65ad2eca822dfaec2a3603119ec3cc8826a7859e" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "33a17515b79ddb10d750320fa994098bdc3e93ef" }, + "nvim-various-textobjs": { "branch": "main", "commit": "52343c70e2487095cafd4a5000d0465a2b992b03" }, "oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "quickfix-reflector.vim": { "branch": "master", "commit": "6a6a9e28e1713b9e9db99eec1e6672e5666c01b9" }, -- cgit 1.4.1