akinsho / akinsho/toggleterm.nvim

[Feature] Allow multiple terminals opened in different tabpages

Đang mở
#452 16 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Lua
Star
5.6k
Fork
206
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi, thanks for making this awesome plugin, it makes nvim's builtin terminal much more ergonomic and user-friendly.

Sometimes I work on 2+ projects in neovim and keeps them in multiple tabs, and it would be nice to have multiple toggleterms opened in these tabs. Currently if I open a toggleterm in one tab, switch to another tab and call 'toggleterm.toggle_command()` again, toggleterm will close the terminal in the previous tabpage instead of opening a new one in the current tabpage.

I assume this might be a config issue and can be solved by passing proper opts to toggleterm? The following is my config if that's related:

```lua
local toggleterm = require('toggleterm')

toggleterm.setup({
open_mapping = '',
shade_terminals = false,
start_in_insert = false,
hide_numbers = true,
autochdir = false,
persist_size = false,
direction = 'horizontal',
float_opts = {
border = 'shadow',
width = function()
return math.floor(vim.go.columns * 0.7)
end,
height = function()
return math.floor(vim.go.lines * 0.7)
end,
winblend = 0,
},
size = function(term)
if term.direction == 'horizontal' then
return vim.go.lines * 0.3
elseif term.direction == 'vertical' then
return vim.go.columns * 0.35
end
end,
highlights = {
NormalFloat = { link = 'NormalFloat' },
FloatBorder = { link = 'FloatBorder' },
WinBarActive = { link = 'WinBar' },
WinBarInactive = { link = 'WinBarNC' },
MatchParen = { link = 'None' },
},
winbar = {
enabled = false,
},
on_open = function()
vim.cmd('silent! normal! 0')
end,
})
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.