1
0
Fork 0
dotfiles/config/nvim/plugins/toggleterm.fnl

16 lines
737 B
Text
Raw Normal View History

2022-04-17 19:44:56 +00:00
(let [toggleterm (require :toggleterm)]
2022-04-20 14:27:26 +00:00
(toggleterm.setup {:shell vim.o.shell
:open_mapping :<C-t>
:close_on_exit true})
2022-04-17 19:44:56 +00:00
(let [augroup (vim.api.nvim_create_augroup :NifocTerm {:clear true})
2022-04-20 14:27:26 +00:00
aucmd vim.api.nvim_create_autocmd
keymap (require :nifoc.keymap)]
(aucmd :TermOpen {:pattern "term://*toggleterm#*"
:callback (fn [opts]
2022-04-17 19:44:56 +00:00
(set vim.opt_local.number false)
(set vim.opt_local.relativenumber false)
2022-04-20 14:27:26 +00:00
(set vim.opt_local.cursorline false)
(keymap.terminal-open opts.buf))
2022-04-17 19:44:56 +00:00
:group augroup})))
2022-04-20 14:27:26 +00:00