mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(util.toggle): In accordance with #3202
With this change we can disable inlay hints only in a single buffer
without disabling them globally (as the current state is).
Some things to consider:
- Do we want to consider both `bufstate` and `globalstate`? In this
case, maybe we should not merge this and just add 2 keymaps, one
where we pass `buffer` (`bufstate`) and one where we don't pass
anything (`globalstate`)? But in `nvim-lspconfig` spec we pass
`buffer` to toggle them on (`bufstate`), but I guess that only has
effect on the `is_enabled` when checking for the value.
- Or just don't merge this and keep enabling/disabling globally only.
This commit is contained in:
parent
91fe7ef568
commit
43e384dc02
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ function M.inlay_hints(buf, value)
|
|||
if value == nil then
|
||||
value = not ih.is_enabled({ bufnr = buf or 0 })
|
||||
end
|
||||
ih.enable(value, { bufnr = buf })
|
||||
ih.enable(value, { bufnr = buf or 0 })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue