Bug: Loading condition of "snacks-picker" provider seems to be broken #199
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
arduinohatesme/leetcode.nvim#199
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The code that loads snacks at the moment looks like this (assuming I found the correct place):
github.com/kawre/leetcode.nvim@422b6beb4a/lua/leetcode/picker/init.lua (L12-L19)but that doesn't seem to work anymore:
enabledoptionSnacks.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:
Without
Snacks.config.picker.enabled = trueit doesn't work, but:lua Snacks.picker.files()And if we check manually:
And with the mention above fix it's working as expected:
There is
enabledoption in snacks config -> https://github.com/folke/snacks.nvim?tab=readme-ov-file#-usage. Can you enable it and try again?Hi. I checked the actual code just in case, and there's no
enabledas well https://github.com/folke/snacks.nvim/blob/main/lua/snacks/picker/config/defaults.lua#L65Sorry, my weekdays are usually a bit busy, I'll try to make a minimal reproducible example when I have time and come back with the results in a couple of days
So, I checked using this setup, and it really does work. My original config used picker options, but I haven't set
enabled = true, as there's no such option, according to the snacks types.Pics & Code
Weirdly enough,
Snacks.pickereven works withpicker.enabled = false, so it doesn't seem to really do anything (anymore?). Maybe the readme is just outdated.Pics & Code
The question is, should we rely on an option that's only mentioned once, or would it be better to rewrite the original function as
pcall(Snacks.picker)or something similar?