change toggle term keymap

This commit is contained in:
alice-vu-163 2025-05-06 21:30:03 +07:00
parent 4bdb8920cd
commit 9ced6b0005
3 changed files with 16 additions and 23 deletions

View file

@ -1056,3 +1056,19 @@ require('lazy').setup({
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
local toggleterm = require 'toggleterm'
toggleterm.setup {
open_mapping = 'T', -- press T in normal or terminal to toggle
direction = 'float', -- use a floating window
float_opts = {
border = 'single', -- or "double", "curved", etc.
-- dynamic sizing: 85% of the current editor dimensions
width = function()
return math.floor(vim.o.columns * 0.85)
end,
height = function()
return math.floor(vim.o.lines * 0.85)
end,
},
}