-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
The code that loads snacks at the moment looks like this (assuming I found the correct place):
leetcode.nvim/lua/leetcode/picker/init.lua
Lines 12 to 19 in 422b6be
| ["snacks-picker"] = { | |
| name = "snacks", | |
| is_available = function() | |
| return pcall(function() ---@diagnostic disable-next-line: undefined-field | |
| assert(Snacks.config["picker"].enabled) | |
| end) | |
| end, | |
| }, |
but that doesn't seem to work anymore:
- Snacks config doesn't have an
enabledoption - Picker seems to be always active and available via
Snacks.picker.pickerFunc(), likeSnacks.picker.files()
So in order to make it work, I had to manually set a non-existent setting, so it looks like this:
return {
{
"kawre/leetcode.nvim",
dependencies = {
"folke/snacks.nvim",
-- other deps
},
opts = function()
---@diagnostic disable-next-line: inject-field
Snacks.config.picker.enabled = true
--- @module 'leetcode'
return {
---@type lc.picker
picker = { provider = "snacks-picker" },
-- other options
}
end,
},
}
Without Snacks.config.picker.enabled = true it doesn't work, but :lua Snacks.picker.files()
And if we check manually:
And with the mention above fix it's working as expected:

Metadata
Metadata
Assignees
Labels
No labels