Skip to content

Optional snacks #1632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Optional snacks #1632

wants to merge 1 commit into from

Conversation

szechp
Copy link
Contributor

@szechp szechp commented Jul 10, 2025

as discussed here: #1481 i have implemented snacks picker as an optional replacement for telescope. I hope that we can use this implementation to add more optional plugins, so we don't waste time on deciding if we want whatever new shiny plugin needs to be added or not.

Now we can provide a stable base, but we can also add optional plugins and users can decide themselves.

(thanks to @oriori1703, i just copied his snacks config from the other mr)

@dam9000
Copy link
Contributor

dam9000 commented Jul 10, 2025

nicely done!

perhaps some commits could be squashed, these two together:

add vim.g toggle to disable telescope
remove vim.g option again, use lazyvims enable functionality

and these two as well:

add snacks(picker) as an optional plugin
add some comments to snacks picker to get it inline with telescope config

which would end up in 3 commits, easier to follow changes.

@szechp
Copy link
Contributor Author

szechp commented Jul 10, 2025

Ah sure, I was thinking commits will be squashed on merge anyway, so I was a little messy. I'll fix that

@szechp szechp force-pushed the optional-snacks branch from e3be09c to d2b6453 Compare July 11, 2025 07:15
@oriori1703
Copy link
Contributor

oriori1703 commented Jul 11, 2025

This looks great, but as I said in #1481 (comment), I do think it would be better to just have one picker.

Though, I think it would be beneficial to have the autocmds defined in the plugin, even if in the end only one of the pickers would be chosen, because it would be easier to switch to the other 😄

@szechp
Copy link
Contributor Author

szechp commented Jul 11, 2025

I should split this into two prs then

One for the telescope change and one for snacks, so we can better decide on that

add some comments to snacks picker to get it inline with telescope config
-- picker like this one here more easily when the keymaps are defined in the plugin itself.
-- It sets up buffer-local keymaps, autocommands, and other LSP-related settings
-- whenever an LSP client attaches to a buffer.
config = function()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, should this not be init instead of config?

Copy link
Contributor Author

@szechp szechp Jul 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, should this not be init instead of config?

This used to be together with this:

#1640

I separated them into two prs. This one will likely not be merged, at least according to what I feel is the current consensus regarding kickstart.

If you ever want to replace telescope, you can always take this once the smaller change is merged

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @szechp, i did replace telescope with snacks, but it looks like using config as is will override any opts being set.. only thing that worked for me was to replace it with init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants