akinsho / akinsho/toggleterm.nvim

[Feature] Allow multiple terminals opened in different tabpages

Abierto
#452 16 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Lua
Estrellas
5.6k
Forks
206
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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,
})
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.