Dynamic diagnostics and modified indicator; obviates my need for a status line! #31
raj-magesh
started this conversation in
Showcase
Replies: 2 comments 3 replies
-
This looks great, I think I might steal the idea for my config! One suggestion, I think you can simplify the code a bit: local function get_diagnostic_label(props)
local icons = {
Error = '',
Warn = '',
Info = '',
Hint = '',
}
local label = {}
for severity, icon in pairs(icons) do
local n = #vim.diagnostic.get(props.buf, { severity = vim.diagnostic.severity[string.upper(severity)] })
if n > 0 then
table.insert(label, { icon .. ' ' .. n .. ' ', group = 'DiagnosticSign' .. severity })
end
end
return label
end Unless you really only want the foreground color, but I tested it and it seems to look the same in my theme at least. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Wondering how can you make such a LSP diagnostics like this
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Building on this discussion that gives an example of how diagnostic info can be added to
incline
! This is my first time coding inlua
(with any control flow, at least), so if you spot any places to improve, please point them out!Configuration
Metadata
colorschemes: Gruvbox, Catppuccin (macchiato)
font: Meslo Nerd Font
Beta Was this translation helpful? Give feedback.
All reactions