{...}: { programs.nixvim = { plugins = { trouble = { enable = true; settings = { modes = { preview_split = { mode = "diagnostics"; preview = { type = "split"; relative = "win"; position = "right"; size = 0.5; }; }; preview_float = { mode = "diagnostics"; preview = { type = "float"; relative = "editor"; border = "rounded"; title = "Preview"; title_pos = "center"; position = [ 0 (-2) ]; size = { width = 0.3; height = 0.3; }; zindex = 200; }; }; }; }; }; which-key.settings.spec = [ { __unkeyed = "x"; mode = "n"; group = " Trouble"; } ]; }; keymaps = [ { mode = "n"; key = "xx"; action = "Trouble preview_split toggle"; options = { desc = "Diagnostics toggle"; silent = true; }; } { mode = "n"; key = "xX"; action = "Trouble preview_split toggle filter.buf=0"; options = { desc = "Buffer Diagnostics toggle"; silent = true; }; } { mode = "n"; key = "us"; action = "Trouble symbols toggle focus=false"; options = { desc = "Symbols toggle"; silent = true; }; } { mode = "n"; key = "xl"; action = "Trouble lsp toggle focus=false win.position=right"; options = { desc = "LSP Definitions / references / ... toggle"; silent = true; }; } { mode = "n"; key = "xL"; action = "Trouble loclist toggle"; options = { desc = "Location List toggle"; silent = true; }; } { mode = "n"; key = "xQ"; action = "Trouble qflist toggle"; options = { desc = "Quickfix List toggle"; silent = true; }; } ]; }; }