fix: remove custom size, use toggleterm defaults
This commit is contained in:
parent
2611de78f2
commit
8981eebd1a
|
|
@ -47,7 +47,7 @@ vim.keymap.set('n', '<leader>gg', function() Q.open('lazygit') end)
|
||||||
## 特性
|
## 特性
|
||||||
|
|
||||||
- **持久化** — toggle 显隐,终端状态保留
|
- **持久化** — toggle 显隐,终端状态保留
|
||||||
- **自适应** — 横屏右侧 45%,竖屏下方 40%
|
- **自适应** — 横屏右侧分屏,竖屏下方分屏(toggleterm 默认尺寸)
|
||||||
- **轻量** — 仅依赖 toggleterm.nvim,无其他依赖
|
- **轻量** — 仅依赖 toggleterm.nvim,无其他依赖
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ function M.open(cmd)
|
||||||
terms[name] = require('toggleterm.terminal').Terminal:new({
|
terms[name] = require('toggleterm.terminal').Terminal:new({
|
||||||
direction = tall and 'horizontal' or 'vertical',
|
direction = tall and 'horizontal' or 'vertical',
|
||||||
cmd = cmd,
|
cmd = cmd,
|
||||||
size = tall and math.floor(ui.height * 0.4) or math.floor(ui.width * 0.45),
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue