mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 08:35:53 +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
|
@ -7,9 +7,9 @@ return {
|
|||
"mason.nvim",
|
||||
{ "williamboman/mason-lspconfig.nvim", config = function() end },
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = function()
|
||||
return {
|
||||
---@class PluginLspOpts
|
||||
local ret = {
|
||||
-- options for vim.diagnostic.config()
|
||||
---@type vim.diagnostic.Opts
|
||||
diagnostics = {
|
||||
|
@ -114,6 +114,7 @@ return {
|
|||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
}
|
||||
return ret
|
||||
end,
|
||||
---@param opts PluginLspOpts
|
||||
config = function(_, opts)
|
||||
|
@ -150,7 +151,7 @@ return {
|
|||
and vim.bo[buffer].buftype == ""
|
||||
and not vim.tbl_contains(opts.inlay_hints.exclude, vim.bo[buffer].filetype)
|
||||
then
|
||||
LazyVim.toggle.inlay_hints(buffer, true)
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = buffer })
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue