feat(nvim): add toggleterm
This commit is contained in:
parent
f3d0d8a5d4
commit
fe562fb972
@ -50,6 +50,9 @@ M.setup = function()
|
|||||||
|
|
||||||
-- Sudo Write
|
-- Sudo Write
|
||||||
vim.keymap.set("c", "w!!", "w !sudo tee > /dev/null %")
|
vim.keymap.set("c", "w!!", "w !sudo tee > /dev/null %")
|
||||||
|
|
||||||
|
-- Terminal mappings
|
||||||
|
vim.keymap.set("t", [[<C-\>]], [[<C-\><C-n>]])
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -155,3 +155,6 @@ vim.keymap.set("", ";s", "<cmd>HopPattern<CR>")
|
|||||||
vim.keymap.set("", ";;", "<cmd>HopWord<CR>")
|
vim.keymap.set("", ";;", "<cmd>HopWord<CR>")
|
||||||
vim.keymap.set("", ";a", "<cmd>HopAnywhere<CR>")
|
vim.keymap.set("", ";a", "<cmd>HopAnywhere<CR>")
|
||||||
vim.keymap.set("", ";v", "<cmd>HopVertical<CR>")
|
vim.keymap.set("", ";v", "<cmd>HopVertical<CR>")
|
||||||
|
|
||||||
|
-- Term/Open bindings
|
||||||
|
vim.keymap.set("n", "<leader>ot", "<cmd>ToggleTerm<CR>")
|
||||||
|
@ -764,6 +764,30 @@ return packer.startup({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
use({
|
||||||
|
"akinsho/toggleterm.nvim",
|
||||||
|
config = function()
|
||||||
|
require("toggleterm").setup({
|
||||||
|
start_in_insert = false,
|
||||||
|
direction = "vertical",
|
||||||
|
autochdir = true,
|
||||||
|
size = function(term)
|
||||||
|
if term.direction == "vertical" then
|
||||||
|
return vim.o.columns * 0.5
|
||||||
|
else
|
||||||
|
return 30
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
winbar = {
|
||||||
|
enable = true,
|
||||||
|
name_formatter = function(term) -- term: Terminal
|
||||||
|
return term.name
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Leave at end!!!
|
-- Leave at end!!!
|
||||||
-- Install and deploy packer plugins
|
-- Install and deploy packer plugins
|
||||||
-- automatically
|
-- automatically
|
||||||
|
Loading…
Reference in New Issue
Block a user