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