summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl')
-rw-r--r--fnl/config/toggleterm.fnl11
1 files changed, 10 insertions, 1 deletions
diff --git a/fnl/config/toggleterm.fnl b/fnl/config/toggleterm.fnl
index 87d9eb6..1aaee62 100644
--- a/fnl/config/toggleterm.fnl
+++ b/fnl/config/toggleterm.fnl
@@ -1,6 +1,15 @@
;; Terminal inside nvim.
-(module config.toggleterm {autoload {: util}})
+(module config.toggleterm {autoload {: util nvim aniseed.nvim}})
(def- opts {:shade_terminals false})
+(defn- set-terminal-keymaps []
+ (nvim.set_keymap :t :<C-h> "<Cmd>wincmd h<CR>" {})
+ (nvim.set_keymap :t :<C-j> "<Cmd>wincmd j<CR>" {})
+ (nvim.set_keymap :t :<C-k> "<Cmd>wincmd k<CR>" {})
+ (nvim.set_keymap :t :<C-l> "<Cmd>wincmd l<CR>" {}))
+
(util.use-config :toggleterm opts)
+(util.autocmd :TermOpen
+ {:pattern "term://*toggleterm#*"
+ :callback set-terminal-keymaps})