Filter items using attribute tables
mainYou can create a simple filter by providing a table where the keys correspond to item attributes. When using a table, all specified conditions are treated with logical AND (e.g., an item must match all attributes in the table to be kept).
-- Example: Keep diagnostics with severity error in the current buffer when its filetype is 'lua'
{
modes = {
my_diagnostics = {
mode = 'diagnostics',
filter = { buf = 0, ft = 'lua' },
},
},
}