Is there a way to hide/disable the plugin on the fly. #204
-
I don’t want to use the plugin all the time, sometimes it just distracts me. Is there an API I can use to hide/disable the plugin and then enable it later (like a toggle command)? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can try to customize your require('dropbar').setup({
bar = {
enable = function(buf, win, _)
return not vim.w[win].winbar_no_attach -- add this line
and vim.api.nvim_buf_is_valid(buf)
and vim.api.nvim_win_is_valid(win)
and vim.wo[win].winbar == ''
and vim.fn.win_gettype(win) == ''
and vim.bo[buf].ft ~= 'help'
and ((pcall(vim.treesitter.get_parser, buf)) and true or false)
end,
},
}) Then to disable dropbar in current window, you can just use the command |
Beta Was this translation helpful? Give feedback.
You can try to customize your
bar.enable
function so that it won't attach to current window if window-local variablewinbar_no_attach
is set, like this:Then to disable dropbar in current window, you can just use the command
:setlocal winbar= | let w:winbar_no_attach = v:…