1
0
Fork 0

nvim: FTerm -> toggleterm

This commit is contained in:
Daniel Kempkens 2022-04-17 21:44:56 +02:00
parent b4a359196b
commit 3d167d8bf9
6 changed files with 15 additions and 17 deletions

View file

@ -102,8 +102,4 @@
(aucmd :InsertEnter {:callback #(ls.maybe-set-relativenumber false) (aucmd :InsertEnter {:callback #(ls.maybe-set-relativenumber false)
:group augroup}) :group augroup})
(aucmd :InsertLeave {:callback #(ls.maybe-set-relativenumber true) (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})))

View file

@ -9,8 +9,7 @@
telescope-ivy (telescope-themes.get_ivy) telescope-ivy (telescope-themes.get_ivy)
telescope-dropdown (telescope-themes.get_dropdown) telescope-dropdown (telescope-themes.get_dropdown)
npairs (require :nvim-autopairs) npairs (require :nvim-autopairs)
gitsigns (require :gitsigns) gitsigns (require :gitsigns)]
fterm (require :FTerm)]
(fn map-entry [key cmd opts] (fn map-entry [key cmd opts]
(vim.tbl_extend :keep {1 key 2 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>(YankyGPutAfter)")
(keymap.set :x :gP "<Plug>(YankyGPutBefore)") (keymap.set :x :gP "<Plug>(YankyGPutBefore)")
(keymap.set :n :y "<Plug>(YankyYank)") (keymap.set :n :y "<Plug>(YankyYank)")
(keymap.set :x :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}))
(fn mod.lsp-attach [client bufnr] (fn mod.lsp-attach [client bufnr]
(legendary.bind_keymaps [(map-entry :<leader>t (legendary.bind_keymaps [(map-entry :<leader>t

View file

@ -1,3 +0,0 @@
(let [fterm (require :FTerm)]
(fterm.setup {:cmd :fish
:border ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]}))

View 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})))

View file

@ -1,7 +1,7 @@
(let [visual-eof (require :visual-eof)] (let [visual-eof (require :visual-eof)]
(visual-eof.setup {:text_EOL "↵" (visual-eof.setup {:text_EOL "↵"
:text_NOEOL "✗↵" :text_NOEOL "✗↵"
:ft_ng [:git.* :netrw :TelescopePrompt] :ft_ng [:git.* :netrw :TelescopePrompt :toggleterm]
:buf_filter (lambda [bufnr] :buf_filter (lambda [bufnr]
(let [disable_buftypes [:terminal :nofile] (let [disable_buftypes [:terminal :nofile]
buftype (vim.api.nvim_buf_get_option bufnr buftype (vim.api.nvim_buf_get_option bufnr

View file

@ -300,8 +300,8 @@ in
undotree undotree
{ {
plugin = FTerm-nvim; plugin = toggleterm-nvim;
config = builtins.readFile ../../config/nvim/plugins/fterm.fnl; config = builtins.readFile ../../config/nvim/plugins/toggleterm.fnl;
type = "fennel"; type = "fennel";
} }
]); ]);