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 ++ 2 files changed, 12 insertions(+) (limited to 'fnl/nvrc') 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!) -- cgit 1.4.1