We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using winbar to work with multiple windows. I want to able to see if a certain file has errors at a glance.
Since we have a show_modified option, I think it's also good to have show_diagnostics option.
show_modified
show_diagnostics
Using the custom_section to show a text or symbol when there are diagnostics error:
custom_section
-- winbar plugin return { "utilyre/barbecue.nvim", name = "barbecue", version = "*", dependencies = { "SmiteshP/nvim-navic", "nvim-tree/nvim-web-devicons", -- optional dependency }, config = function() local function has_diagnostics(buf) local severties = { "error", "warning" } for _, sev in ipairs(severties) do local n = #vim.diagnostic.get(buf, { severity = vim.diagnostic.severity[string.upper(sev)] }) if n > 0 then return true end end return false end require("barbecue").setup({ custom_section = function(bfnr, _) local custom = "" if has_diagnostics(bfnr) then custom = " " .. custom end return custom end, }) end, }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Requirements
Problem
I'm using winbar to work with multiple windows. I want to able to see if a certain file has errors at a glance.
Solution Suggestion
Since we have a
show_modified
option, I think it's also good to haveshow_diagnostics
option.Workaround
Using the
custom_section
to show a text or symbol when there are diagnostics error:The text was updated successfully, but these errors were encountered: