Closed sharpchen closed 2 weeks ago
I have the same issue. I don't think that it is an issue related to toggleterm since if you open a standard neovim terminal (:term
) the issue is also appearing.
Also, I only experience the issue when I'm inside a devShell.
@pierrot-lc is right thanks for jumping in. Basically this plugin doesn't control how anything in the terminal is rendered only neovim can control that at a lower level. So this issue is likely somewhere between your shell, neovim and your prompt tool not here.
It seems manually set vim.o.shell = 'bash'
causes the problem. Use default value fixed the problem.
return {
'akinsho/toggleterm.nvim',
version = '*',
init = function() end,
config = function()
- vim.o.shell = vim
- .iter({ 'bash', 'nu', 'zsh' })
- :filter(function(x)
- return vim.fn.executable(x) == 1
- end)
- :peek()
require('toggleterm').setup({
start_in_insert = true,
direction = 'float',
float_opts = {
border = 'rounded',
},
})
end,
}
Is there an existing issue for this?
Current Behavior
Inside toggleterm
Expected Behavior
In normal terminal
Steps To Reproduce
starship config
```toml "$schema" = 'https://starship.rs/config-schema.json' add_newline = true format = '$all' [aws] disabled = true [battery] disabled = true [cmd_duration] [directory] truncation_length = 3 [dotnet] symbol = ' ' format = '[$symbol($version )($tfm)]($style)' [env_var] disabled = true [elm] symbol = " " [git_branch] [git_commit] disabled = false commit_hash_length = 4 tag_disabled = false [git_state] disabled = true [git_status] [golang] symbol = " " [kubernetes] symbol = "⎈ " [line_break] disabled = false [memory_usage] disabled = true [java] symbol = " " [julia] symbol = " " [nodejs] symbol = "" [package] symbol = "📦" [rust] symbol = '' [time] disabled = true [username] disabled = false ```toggleterm config
```lua return { 'akinsho/toggleterm.nvim', version = '*', init = function() end, config = function() vim.o.shell = vim .iter({ 'bash', 'nu', 'pwsh', 'zsh' }) :filter(function(x) return vim.fn.executable(x) == 1 end) :peek() require('toggleterm').setup({ start_in_insert = true, direction = 'float', float_opts = { border = 'rounded', }, }) local Terminal = require('toggleterm.terminal').Terminal local rootTerm = Terminal:new({ count = 1 }) local bufTerm = Terminal:new({ count = 5 }) local bufPath = nil vim.keymap.set({ 'n', 'x', 't', 'v' }, '