diff --git a/modules/extra/deprecations.nix b/modules/extra/deprecations.nix index 5a30ef5e..a4ac56a3 100644 --- a/modules/extra/deprecations.nix +++ b/modules/extra/deprecations.nix @@ -54,5 +54,10 @@ in { Nvf now uses $NVIM_APP_NAME so there is no longer the problem of (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. + '') ]; } diff --git a/modules/plugins/lsp/trouble/config.nix b/modules/plugins/lsp/trouble/config.nix index 9bbc71c3..b64a9151 100644 --- a/modules/plugins/lsp/trouble/config.nix +++ b/modules/plugins/lsp/trouble/config.nix @@ -21,19 +21,18 @@ in { cmd = "Trouble"; keys = [ - (mkSetLznBinding "n" mappings.toggle "TroubleToggle") - (mkSetLznBinding "n" mappings.workspaceDiagnostics "TroubleToggle workspace_diagnostics") - (mkSetLznBinding "n" mappings.documentDiagnostics "TroubleToggle document_diagnostics") - (mkSetLznBinding "n" mappings.lspReferences "TroubleToggle lsp_references") - (mkSetLznBinding "n" mappings.quickfix "TroubleToggle quickfix") - (mkSetLznBinding "n" mappings.locList "TroubleToggle loclist") + (mkSetLznBinding "n" mappings.workspaceDiagnostics "Trouble toggle diagnostics") + (mkSetLznBinding "n" mappings.documentDiagnostics "Trouble toggle diagnostics filter.buf=0") + (mkSetLznBinding "n" mappings.lspReferences "Trouble toggle lsp_references") + (mkSetLznBinding "n" mappings.quickfix "Trouble toggle quickfix") + (mkSetLznBinding "n" mappings.locList "Trouble toggle loclist") + (mkSetLznBinding "n" mappings.symbols "Trouble toggle symbols") ]; }; binds.whichKey.register = pushDownDefault { - "l" = "Trouble"; "x" = "+Trouble"; - "lw" = "Workspace"; + "lw" = "+Workspace"; }; }; }; diff --git a/modules/plugins/lsp/trouble/trouble.nix b/modules/plugins/lsp/trouble/trouble.nix index 04bd5068..5fa5a3df 100644 --- a/modules/plugins/lsp/trouble/trouble.nix +++ b/modules/plugins/lsp/trouble/trouble.nix @@ -10,12 +10,12 @@ in { setupOpts = mkPluginSetupOption "Trouble" {}; mappings = { - toggle = mkMappingOption "Toggle trouble [trouble]" "xx"; workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "lwd"; documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "ld"; lspReferences = mkMappingOption "LSP References [trouble]" "lr"; quickfix = mkMappingOption "QuickFix [trouble]" "xq"; locList = mkMappingOption "LOCList [trouble]" "xl"; + symbols = mkMappingOption "Symbols [trouble]" "xs"; }; }; };