mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 13:29:55 -06:00
neovim: add toggleterm plugin
This commit is contained in:
29
nvim/.config/nvim/fnl/dotfiles/plugin/toggleterm.fnl
Normal file
29
nvim/.config/nvim/fnl/dotfiles/plugin/toggleterm.fnl
Normal file
@@ -0,0 +1,29 @@
|
||||
(module dotfiles.toggleterm
|
||||
{autoload {a aniseed.core}
|
||||
require {nvim aniseed.nvim
|
||||
nu aniseed.nvim.util
|
||||
toggleterm toggleterm}})
|
||||
|
||||
(toggleterm.setup {
|
||||
:open_mapping :<c-\>
|
||||
:start_in_insert true
|
||||
:insert_mappings true ;; whether or not the open mapping applies in insert mode
|
||||
:terminal_mappings true ;; whether or not the open mapping applies in the opened terminals
|
||||
:persist_size true
|
||||
:persist_mode true ;; if set to true (default) the previous terminal mode will be remembered
|
||||
})
|
||||
|
||||
|
||||
(defn set_terminal_keymaps []
|
||||
(vim.keymap.set :t :<esc> :<C-\><C-n>)
|
||||
(vim.keymap.set :t :jk :<C-\><C-n>)
|
||||
(vim.keymap.set :t :<C-h> "<Cmd>wincmd h<CR>")
|
||||
(vim.keymap.set :t :<C-j> "<Cmd>wincmd j<CR>")
|
||||
(vim.keymap.set :t :<C-k> "<Cmd>wincmd k<CR>")
|
||||
(vim.keymap.set :t :<C-l> "<Cmd>wincmd l<CR>")
|
||||
(vim.keymap.set :t :<C-w> :<C-\><C-n><C-w>))
|
||||
|
||||
|
||||
(nu.fn-bridge :SetTerminalKeymaps :dotfiles.toggleterm :set_terminal_keymaps {:return false})
|
||||
|
||||
(nvim.ex.autocmd :TermOpen "term://*" :call "SetTerminalKeymaps()")
|
||||
@@ -23,6 +23,7 @@
|
||||
:Olical/fennel.vim {}
|
||||
:ahmedkhalf/project.nvim {}
|
||||
:airblade/vim-gitgutter {}
|
||||
:akinsho/toggleterm.nvim {:mod :toggleterm}
|
||||
:clojure-vim/vim-jack-in {}
|
||||
:christianrondeau/vim-base64 {}
|
||||
:dhruvasagar/vim-table-mode {}
|
||||
|
||||
Reference in New Issue
Block a user