nvim: FTerm -> toggleterm
This commit is contained in:
parent
b4a359196b
commit
3d167d8bf9
6 changed files with 15 additions and 17 deletions
|
@ -102,8 +102,4 @@
|
|||
(aucmd :InsertEnter {:callback #(ls.maybe-set-relativenumber false)
|
||||
:group augroup})
|
||||
(aucmd :InsertLeave {:callback #(ls.maybe-set-relativenumber true)
|
||||
:group augroup})
|
||||
(aucmd :TermOpen {:callback (fn []
|
||||
(vim.opt_local.number false)
|
||||
(vim.opt_local.relativenumber false))
|
||||
:group augroup})))
|
||||
:group augroup})))
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
telescope-ivy (telescope-themes.get_ivy)
|
||||
telescope-dropdown (telescope-themes.get_dropdown)
|
||||
npairs (require :nvim-autopairs)
|
||||
gitsigns (require :gitsigns)
|
||||
fterm (require :FTerm)]
|
||||
gitsigns (require :gitsigns)]
|
||||
(fn map-entry [key cmd opts]
|
||||
(vim.tbl_extend :keep {1 key 2 cmd} opts))
|
||||
|
||||
|
@ -105,10 +104,7 @@
|
|||
(keymap.set :x :gp "<Plug>(YankyGPutAfter)")
|
||||
(keymap.set :x :gP "<Plug>(YankyGPutBefore)")
|
||||
(keymap.set :n :y "<Plug>(YankyYank)")
|
||||
(keymap.set :x :y "<Plug>(YankyYank)")
|
||||
(keymap.set :n :<C-t> fterm.toggle {:noremap true :silent true})
|
||||
(keymap.set :t :<C-t> "<C-\\><C-n><cmd>lua require(\"FTerm\").toggle()<CR>"
|
||||
{:noremap true :silent true}))
|
||||
(keymap.set :x :y "<Plug>(YankyYank)"))
|
||||
|
||||
(fn mod.lsp-attach [client bufnr]
|
||||
(legendary.bind_keymaps [(map-entry :<leader>t
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
(let [fterm (require :FTerm)]
|
||||
(fterm.setup {:cmd :fish
|
||||
:border ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]}))
|
9
config/nvim/plugins/toggleterm.fnl
Normal file
9
config/nvim/plugins/toggleterm.fnl
Normal file
|
@ -0,0 +1,9 @@
|
|||
(let [toggleterm (require :toggleterm)]
|
||||
(toggleterm.setup {:shell :fish :open_mapping :<C-t>})
|
||||
(let [augroup (vim.api.nvim_create_augroup :NifocTerm {:clear true})
|
||||
aucmd vim.api.nvim_create_autocmd]
|
||||
(aucmd :TermOpen {:callback (fn []
|
||||
(set vim.opt_local.number false)
|
||||
(set vim.opt_local.relativenumber false)
|
||||
(set vim.opt_local.cursorline false))
|
||||
:group augroup})))
|
|
@ -1,7 +1,7 @@
|
|||
(let [visual-eof (require :visual-eof)]
|
||||
(visual-eof.setup {:text_EOL "↵"
|
||||
:text_NOEOL "✗↵"
|
||||
:ft_ng [:git.* :netrw :TelescopePrompt]
|
||||
:ft_ng [:git.* :netrw :TelescopePrompt :toggleterm]
|
||||
:buf_filter (lambda [bufnr]
|
||||
(let [disable_buftypes [:terminal :nofile]
|
||||
buftype (vim.api.nvim_buf_get_option bufnr
|
||||
|
|
|
@ -300,8 +300,8 @@ in
|
|||
undotree
|
||||
|
||||
{
|
||||
plugin = FTerm-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/fterm.fnl;
|
||||
plugin = toggleterm-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/toggleterm.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue