aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2023-04-28 12:10:24 +0200
committerGitHub <noreply@github.com>2023-04-28 12:10:24 +0200
commit48bb1cc33a1fefe94f5ce4972446a1c6ad849f15 (patch)
treee067dcffc581c46d22d6d482cd6cf06a723e8904 /lua
parentdocs: update help links (#1267) (diff)
downloadmason-48bb1cc33a1fefe94f5ce4972446a1c6ad849f15.tar
mason-48bb1cc33a1fefe94f5ce4972446a1c6ad849f15.tar.gz
mason-48bb1cc33a1fefe94f5ce4972446a1c6ad849f15.tar.bz2
mason-48bb1cc33a1fefe94f5ce4972446a1c6ad849f15.tar.lz
mason-48bb1cc33a1fefe94f5ce4972446a1c6ad849f15.tar.xz
mason-48bb1cc33a1fefe94f5ce4972446a1c6ad849f15.tar.zst
mason-48bb1cc33a1fefe94f5ce4972446a1c6ad849f15.zip
feat(ui): add keymap setting for toggling package installation log (#1268)
Closes #1030.
Diffstat (limited to 'lua')
-rw-r--r--lua/mason/settings.lua2
-rw-r--r--lua/mason/ui/components/main/package_list.lua3
2 files changed, 3 insertions, 2 deletions
diff --git a/lua/mason/settings.lua b/lua/mason/settings.lua
index 9ce965ea..2409615e 100644
--- a/lua/mason/settings.lua
+++ b/lua/mason/settings.lua
@@ -104,6 +104,8 @@ local DEFAULT_SETTINGS = {
cancel_installation = "<C-c>",
-- Keymap to apply language filter
apply_language_filter = "<C-f>",
+ -- Keymap to toggle viewing package installation log
+ toggle_package_install_log = "<CR>",
},
},
}
diff --git a/lua/mason/ui/components/main/package_list.lua b/lua/mason/ui/components/main/package_list.lua
index b0f633e6..55a0fd3d 100644
--- a/lua/mason/ui/components/main/package_list.lua
+++ b/lua/mason/ui/components/main/package_list.lua
@@ -219,7 +219,7 @@ local function InstallingPackageComponent(pkg, state)
Ui.Keybind(settings.current.ui.keymaps.install_package, "INSTALL_PACKAGE", pkg),
Ui.CascadingStyleNode({ "INDENT" }, {
Ui.HlTextNode(pkg_state.is_log_expanded and p.Bold "▼ Displaying full log" or p.muted(tail)),
- Ui.Keybind("<CR>", "TOGGLE_INSTALL_LOG", pkg),
+ Ui.Keybind(settings.current.ui.keymaps.toggle_package_install_log, "TOGGLE_INSTALL_LOG", pkg),
Ui.StickyCursor { id = ("%s-toggle-install-log"):format(pkg.name) },
}),
Ui.When(pkg_state.is_log_expanded, function()
@@ -284,7 +284,6 @@ local function Failed(state)
state = state,
heading = Ui.HlTextNode(p.heading "Failed"),
packages = packages,
- ---@param pkg Package
list_item_renderer = InstallingPackageComponent,
}
end