add workspace diagnostics filter for trouble

This commit is contained in:
Patrick Neff 2024-08-07 11:04:11 +02:00
parent 0a034da88f
commit aee3628a7e
1 changed files with 24 additions and 2 deletions

View File

@ -1,9 +1,31 @@
{ {
plugins.trouble.enable = true; plugins.trouble = {
enable = true;
settings = {
modes = {
workspace-diagnostics = {
mode = "diagnostics";
filter = [{
any = [
{ buf = 0; }
{
__raw =
''
function(item)
return item.filename:find((vim.loop or vim.uv).cwd(), 1, true)
end
'';
}
];
}];
};
};
};
};
keymaps = [ keymaps = [
{ {
key = "<leader>xx"; key = "<leader>xx";
action = "<cmd>Trouble diagnostics toggle<CR>"; action = "<cmd>Trouble workspace-diagnostics toggle<CR>";
options = { options = {
silent = true; silent = true;
}; };