mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 09:59:54 -06:00
neovim - utils namespace updates
This commit is contained in:
@@ -1,23 +1,21 @@
|
|||||||
(module dotfiles.util
|
(module dotfiles.util {autoload {a aniseed.core} require {nvim aniseed.nvim}})
|
||||||
{autoload
|
|
||||||
{a aniseed.core}
|
|
||||||
require
|
|
||||||
{nvim aniseed.nvim}})
|
|
||||||
|
|
||||||
|
|
||||||
(defn noremap [mode from to opts]
|
(defn noremap [mode from to opts]
|
||||||
(let [map-opts {:noremap true :silent true}
|
(let [map-opts {:noremap true :silent true}
|
||||||
to (.. ":" to "<cr>")
|
to (.. ":" to :<cr>)
|
||||||
buff-num (a.get opts :buff-num)]
|
buff-num (a.get opts :buff-num)]
|
||||||
(if (or (a.get opts :local?) buff-num )
|
(if (or (a.get opts :local?) buff-num)
|
||||||
(nvim.buf_set_keymap (or buff-num 0) mode from to map-opts)
|
(nvim.buf_set_keymap (or buff-num 0) mode from to map-opts)
|
||||||
(nvim.set_keymap mode from to map-opts))))
|
(nvim.set_keymap mode from to map-opts))))
|
||||||
|
|
||||||
(defn nnoremap [from to opts]
|
(defn nnoremap [from to opts] (noremap :n from to opts))
|
||||||
(noremap :n from to opts))
|
|
||||||
|
|
||||||
(defn lnnoremap [from to]
|
(defn tnoremap [from to opts] (noremap :t from to opts))
|
||||||
(nnoremap (.. "<leader>" from) to))
|
|
||||||
|
|
||||||
(defn lvnoremap [from to opts]
|
(defn inoremap [from to opts] (noremap :i from to opts))
|
||||||
(noremap :v (.. "<leader>" from) to opts))
|
|
||||||
|
(defn vnoremap [from to opts] (noremap :v from to opts))
|
||||||
|
|
||||||
|
(defn lnnoremap [from to] (nnoremap (.. :<leader> from) to))
|
||||||
|
|
||||||
|
(defn lvnoremap [from to opts] (noremap :v (.. :<leader> from) to opts))
|
||||||
|
|||||||
Reference in New Issue
Block a user