28 lines
821 B
Fennel
28 lines
821 B
Fennel
(module config.mapping
|
|
{autoload {nvim aniseed.nvim
|
|
nu aniseed.nvim.util
|
|
core aniseed.core}})
|
|
|
|
(defn- noremap [mode from to]
|
|
"Sets a mapping with {:noremap true}"
|
|
(nvim.set_keymap mode from to {:noremap true}))
|
|
|
|
(set nvim.g.mapleader " ")
|
|
(set nvim.g.maplocalleader ",")
|
|
|
|
(set nvim.o.signcolumn "yes")
|
|
|
|
(noremap :n :<leader>u ":UndotreeToggle<cr>")
|
|
|
|
(noremap :n :<leader>h :<c-w><c-h>)
|
|
(noremap :n :<leader>j :<c-w><c-j>)
|
|
(noremap :n :<leader>k :<c-w><c-k>)
|
|
(noremap :n :<leader>l :<c-w><c-l>)
|
|
(noremap :n :<c-k> :<c-u>)
|
|
(noremap :n :<c-j> :<c-d>)
|
|
(noremap :v :<c-k> :<c-u>)
|
|
(noremap :v :<c-j> :<c-d>)
|
|
(noremap :n :<leader>n ":nohl<cr>")
|
|
|
|
(nvim.set_keymap :v :v ":<C-U>call expand_region#next('v', '+')<CR>" {})
|
|
(nvim.set_keymap :v :<c-v> ":<C-U>call expand_region#next('v', '-')<CR>" {})
|