mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
## What is this PR for?
This PR fixes a bug in the `LazyVim.memoize` function that was causing
unexpected behavior in my configuration. The issue was discovered when
setting `vim.g.lazyvim_prettier_needs_config = true` in my
`lua/config/options.lua`, which did not work as expected.
The root cause was an issue with `LazyVim.memoize` cache key generation,
which led to `M.has_config(ctx)` always returning the same result as
`M.has_parser(ctx)`. This happened because `LazyVim.memoize` generates
cache keys based on the function parameters, and both functions were
being called with identical parameters:
|
||
---|---|---|
.. | ||
cmp.lua | ||
extras.lua | ||
format.lua | ||
init.lua | ||
inject.lua | ||
json.lua | ||
lazygit.lua | ||
lsp.lua | ||
lualine.lua | ||
mini.lua | ||
news.lua | ||
pick.lua | ||
plugin.lua | ||
root.lua | ||
telescope.lua | ||
terminal.lua | ||
toggle.lua | ||
ui.lua |