mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(ui): press <c-c>
to abort any running tasks. Fixes #258
This commit is contained in:
parent
ed0583e82b
commit
d6b5d6e756
4 changed files with 69 additions and 4 deletions
|
@ -31,6 +31,7 @@ M.keys = {
|
|||
details = "<cr>",
|
||||
profile_sort = "<C-s>",
|
||||
profile_filter = "<C-f>",
|
||||
abort = "<C-c>",
|
||||
}
|
||||
|
||||
---@type table<string,LazyViewCommand>
|
||||
|
|
|
@ -62,6 +62,11 @@ function M.create()
|
|||
self:update()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", ViewConfig.keys.abort, function()
|
||||
require("lazy.manage.process").abort()
|
||||
return "<c-c>"
|
||||
end, { silent = true, buffer = self.buf, expr = true })
|
||||
|
||||
-- plugin details
|
||||
self:on_key(ViewConfig.keys.details, function()
|
||||
local plugin = self.render:get_plugin()
|
||||
|
|
|
@ -154,7 +154,9 @@ end
|
|||
function M:help()
|
||||
self:append("Help", "LazyH2"):nl():nl()
|
||||
|
||||
self:append("You can press "):append("<CR>", "LazySpecial"):append(" on a plugin to show its details."):nl()
|
||||
self:append("Use "):append("<C-c>", "LazySpecial"):append(" to abort all running tasks."):nl():nl()
|
||||
|
||||
self:append("You can press "):append("<CR>", "LazySpecial"):append(" on a plugin to show its details."):nl():nl()
|
||||
|
||||
self:append("Most properties can be hovered with ")
|
||||
self:append("<K>", "LazySpecial")
|
||||
|
@ -164,7 +166,8 @@ function M:help()
|
|||
:append("<K>", "LazySpecial")
|
||||
:append(" on a plugin anywhere else, a diff will be opened if there are updates")
|
||||
:nl()
|
||||
self:append("or the plugin was just updated. Otherwise the plugin webpage will open."):nl()
|
||||
self:append("or the plugin was just updated. Otherwise the plugin webpage will open."):nl():nl()
|
||||
|
||||
self:append("Use "):append("<d>", "LazySpecial"):append(" on a commit or plugin to open the diff view"):nl()
|
||||
self:nl()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue