Skip to content
Discussion options

You must be logged in to vote

Use bar.enable for this, not bar.sources.

bar.sources only controls what dropbar shows after it has already attached. The default source function actually has a terminal branch:

if vim.bo[buf].buftype == 'terminal' then
  return {
    sources.terminal,
  }
end

So if you want no dropbar at all for ToggleTerm tab terminals, add the terminal check to bar.enable instead:

require('dropbar').setup({
  bar = {
    enable = function(buf, win, _)
      buf = vim._resolve_bufnr(buf)

      if
        not vim.api.nvim_buf_is_valid(buf)
        or not vim.api.nvim_win_is_valid(win)
      then
        return false
      end

      if vim.bo[buf].buftype == 'terminal' then
        return false
      end

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AllergicMushroom
Comment options

Answer selected by AllergicMushroom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants