mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 10:48:45 +02:00
feat(keymaps): dynamic which-key icons/descriptions for toggles (#4050)
## Description <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Related Issue(s) - [ ] Closes #4025 ## Screenshots  ## Checklist - [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
706ec4b6b6
commit
78cf0320bf
9 changed files with 217 additions and 131 deletions
|
@ -121,6 +121,15 @@ end
|
|||
|
||||
---@param opts {skip_next: string, skip_ts: string[], skip_unbalanced: boolean, markdown: boolean}
|
||||
function M.pairs(opts)
|
||||
LazyVim.toggle.map("<leader>up", {
|
||||
name = "Mini Pairs",
|
||||
get = function()
|
||||
return not vim.g.minipairs_disable
|
||||
end,
|
||||
set = function(state)
|
||||
vim.g.minipairs_disable = not state
|
||||
end,
|
||||
})
|
||||
local pairs = require("mini.pairs")
|
||||
pairs.setup(opts)
|
||||
local open = pairs.open
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue