Open botbotty opened 11 months ago
👋🏼 in the case of toggleterm, filetypes are not respected when starts_in_insert
is set to true
on toggleterm's configuration.
The following works as expected:
require("toggleterm").setup({
size = function(term)
if term.direction == "horizontal" then
return 15
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
else
return 20
end
end,
hide_numbers = true,
shade_terminals = false,
start_in_insert = false,
persist_size = true,
})
require("barbecue").setup({
theme = "catppuccin",
show_navic = true,
show_dirname = false,
show_modified = false,
context_follow_icon_color = true,
exclude_filetypes = { "toggleterm" },
})
@vieko When using toggleterm, I have the same issue. When I try the method you suggested by setting start_in_insert
to false
, it does solve the problem, but I still need to manually enter insert mode.
In fact, I found that modifying the on_open
function can also solve the issue of displaying the winbar, without changing start_in_insert
:
on_open = function(term)
vim.defer_fn(function()
vim.wo[term.window].winbar = ""
end, 0)
end
I tried that if vim.defer_fn
is not used, it will not work, so vim.defer_fn
is necessary.
Same can be achieved by doing an UI update on TermEnter
:
vim.api.nvim_create_autocmd('TermEnter',
{ callback = function() require('barbecue.ui').update() end })
Requirements
Expected Behavior
Actual Behavior
Neovim Version
Minimal Configuration
Reproduction
case 1
nvim -u repro.lua
:Neotree
to show the file browsercase 2
nvim -u repro.lua