diff --git a/modules/nixvim/plugins/trouble.nix b/modules/nixvim/plugins/trouble.nix index 93f01dd..4b8d3f1 100644 --- a/modules/nixvim/plugins/trouble.nix +++ b/modules/nixvim/plugins/trouble.nix @@ -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 = [ { key = "xx"; - action = "Trouble diagnostics toggle"; + action = "Trouble workspace-diagnostics toggle"; options = { silent = true; };