Skip to content

Commit

Permalink
feat(ui): add keymap setting for toggling installation log
Browse files Browse the repository at this point in the history
Closes #1030.
  • Loading branch information
williamboman committed Apr 28, 2023
1 parent bf2d253 commit b6b4ff7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lua/mason/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 installation log
toggle_install_log = "<CR>",
},
},
}
Expand Down
3 changes: 1 addition & 2 deletions lua/mason/ui/components/main/package_list.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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_install_log, "TOGGLE_INSTALL_LOG", pkg),
Ui.StickyCursor { id = ("%s-toggle-install-log"):format(pkg.name) },
}),
Ui.When(pkg_state.is_log_expanded, function()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b6b4ff7

Please sign in to comment.