Compare commits

..

1 commit

Author SHA1 Message Date
Ching Pei Yang
9777057ed2
Merge 7f5c33605d into 2bce0d957b 2024-11-15 17:22:53 +01:00
3 changed files with 9 additions and 13 deletions

View file

@ -54,10 +54,5 @@ in {
Nvf now uses $NVIM_APP_NAME so there is no longer the problem of Nvf now uses $NVIM_APP_NAME so there is no longer the problem of
(accidental) leaking of user configuration. (accidental) leaking of user configuration.
'') '')
(mkRemovedOptionModule ["vim" "lsp" "trouble" "mappings" "toggle"] ''
With Trouble having so many different modes, and breaking changes
upstream, it no longer makes sense, nor works, to toggle only Trouble.
'')
]; ];
} }

View file

@ -21,18 +21,19 @@ in {
cmd = "Trouble"; cmd = "Trouble";
keys = [ keys = [
(mkSetLznBinding "n" mappings.workspaceDiagnostics "<cmd>Trouble toggle diagnostics<CR>") (mkSetLznBinding "n" mappings.toggle "<cmd>TroubleToggle<CR>")
(mkSetLznBinding "n" mappings.documentDiagnostics "<cmd>Trouble toggle diagnostics filter.buf=0<CR>") (mkSetLznBinding "n" mappings.workspaceDiagnostics "<cmd>TroubleToggle workspace_diagnostics<CR>")
(mkSetLznBinding "n" mappings.lspReferences "<cmd>Trouble toggle lsp_references<CR>") (mkSetLznBinding "n" mappings.documentDiagnostics "<cmd>TroubleToggle document_diagnostics<CR>")
(mkSetLznBinding "n" mappings.quickfix "<cmd>Trouble toggle quickfix<CR>") (mkSetLznBinding "n" mappings.lspReferences "<cmd>TroubleToggle lsp_references<CR>")
(mkSetLznBinding "n" mappings.locList "<cmd>Trouble toggle loclist<CR>") (mkSetLznBinding "n" mappings.quickfix "<cmd>TroubleToggle quickfix<CR>")
(mkSetLznBinding "n" mappings.symbols "<cmd>Trouble toggle symbols<CR>") (mkSetLznBinding "n" mappings.locList "<cmd>TroubleToggle loclist<CR>")
]; ];
}; };
binds.whichKey.register = pushDownDefault { binds.whichKey.register = pushDownDefault {
"<leader>l" = "Trouble";
"<leader>x" = "+Trouble"; "<leader>x" = "+Trouble";
"<leader>lw" = "+Workspace"; "<leader>lw" = "Workspace";
}; };
}; };
}; };

View file

@ -10,12 +10,12 @@ in {
setupOpts = mkPluginSetupOption "Trouble" {}; setupOpts = mkPluginSetupOption "Trouble" {};
mappings = { mappings = {
toggle = mkMappingOption "Toggle trouble [trouble]" "<leader>xx";
workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "<leader>lwd"; workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "<leader>lwd";
documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "<leader>ld"; documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "<leader>ld";
lspReferences = mkMappingOption "LSP References [trouble]" "<leader>lr"; lspReferences = mkMappingOption "LSP References [trouble]" "<leader>lr";
quickfix = mkMappingOption "QuickFix [trouble]" "<leader>xq"; quickfix = mkMappingOption "QuickFix [trouble]" "<leader>xq";
locList = mkMappingOption "LOCList [trouble]" "<leader>xl"; locList = mkMappingOption "LOCList [trouble]" "<leader>xl";
symbols = mkMappingOption "Symbols [trouble]" "<leader>xs";
}; };
}; };
}; };