Skip to content

Feature/snacks picker #1481

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

Conversation

oriori1703
Copy link

@oriori1703 oriori1703 commented Apr 18, 2025

Switch from telescope to snacks.nvim.

I just switched my config to use snacks instead of telescope, so I'm opening a PR in case it interests anyone else.

I know that this might be controversial because both kickstart and telescope were create by teej (which did an awesome job on both BTW), so feel free to close this if you feel it doesn't suite the project.

Also, if you want, we can also easily use snacks.explorer and snacks.indent to replace neo-tree and indent-blanklines

@oriori1703 oriori1703 force-pushed the feature/snacks-picker branch 2 times, most recently from 47c264e to 9daf9fb Compare April 18, 2025 16:47
@oriori1703
Copy link
Author

oriori1703 commented Apr 18, 2025

Also, I can move the stylua changes to a different PR / remove them entirely

@oriori1703 oriori1703 force-pushed the feature/snacks-picker branch from 9daf9fb to aa93f4d Compare April 18, 2025 17:16
@kaezrr
Copy link
Contributor

kaezrr commented Apr 20, 2025

Damn I was thinking of switching to snacks picker just yesterday, and this PR saves me a lot of time. Also I would suggest to move the stylua changes to a different pr or remove them (just as you suggested), it kind of pollutes this already change-heavy PR.

Cheers

Copy link
Contributor

@kaezrr kaezrr left a comment

Choose a reason for hiding this comment

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

update the libary key of lazydev.nvim in init.lua to the following:

    ...
    library = {
      -- Load luvit types when the `vim.uv` word is found
      { path = '${3rd}/luv/library', words = { 'vim%.uv' } },
      -- Load snacks.nvim when `Snacks` word is found
      { path = 'snacks.nvim', words = { 'Snacks' } },
    },

Otherwise the lua lsp is gonna show a lot of undefined global warnings in your snacks picker configuration. All other changes looks fine.

@oriori1703 oriori1703 force-pushed the feature/snacks-picker branch from aa93f4d to 1ec4080 Compare April 20, 2025 21:52
@oriori1703
Copy link
Author

oriori1703 commented Apr 20, 2025

update the libary key of lazydev.nvim in init.lua to the following:

Oops, I forgot to copy it from my config 🤦
I pushed a fix for this now.

I also split the style lua changes to a different PR :D

Copy link
Contributor

@kaezrr kaezrr left a comment

Choose a reason for hiding this comment

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

Looks good to merge

@nickgnd
Copy link

nickgnd commented Apr 24, 2025

Hey 👋
i'm pretty new to the neovim ecosystem, so please be patient with me 😅

I have a couple of questions. Is there any difference between telescope and snacks.picker or are they fully swappable? And why snacks.picker should be preferable to the telescope for newcomers (target of kickstart.nvim)?

Thank you for your time, cheers ✌️

@dam9000
Copy link
Contributor

dam9000 commented Apr 24, 2025

Well, I would also like to know why is this necessary, what are the benefits of swapping telescope with snacks picker? One downside is that existing kickstart users who are already accustomed to using telescope and might have already done some minor telescope customisations will need to adapt if this is merged. So I would think there would need to be some substantial improvement or benefit for switching.

On the other hand it is useful to have a branch like this so it is easily to try out some new stuff for those that are interested.

@oriori1703
Copy link
Author

oriori1703 commented Apr 24, 2025

Is there any difference between telescope and snacks.picker or are they fully swappable?

They both offer similar functionality and pickers.

And why snacks.picker should be preferable to the telescope for newcomers (target of kickstart.nvim)?

To be honest, I'm not sure it is preferable.
I switched to it mainly because I heard good things, and I was curious about it,

The main advantages I can think of about snacks are:

  • It is a suite of plugins, so if another part of the plugin is useful for you it would be easy to enable it.
  • It looks a bit nicer?
    • This is totally subjective though.
  • It might be faster?
    • At least that's what I have heard, but I can't really tell the difference.
  • It might be more maintained?
    • It seems to have a higher frequency of commits, and PR merging. Though folke (the maintainer) is on vacation so it slowed down a bit in the last month and a half.

On the other hand it is useful to have a branch like this so it is easily to try out some new stuff for those that are interested.

This was my motivation behind this PR 😄

@Noustaa
Copy link

Noustaa commented Apr 24, 2025

One of the main reason i prefer snacks picker over telescope is that it supports frecency sorting out of the box. It can be added to telescope as well by adding nvim-telescope/telescope-frecency.nvim.

@kaezrr
Copy link
Contributor

kaezrr commented Apr 25, 2025

Call me biased but snacks-picker is created and maintained by folke (probably the biggest neovim plugins author), and integrates much nicely with a lot of his other plugins. (Which there are a lot of)

Kickstart aims to ease people into the neovim ecosystem and imo using something like snacks.picker just helps in that direction.

@brianhuster
Copy link

One downside is that existing kickstart users who are already accustomed to using telescope and might have already done some minor telescope customisations will need to adapt if this is merged.

I thought the point of kickstart is that users should copy it to their config and then maintain that config themselves, right? So why would a change in upstream kickstart.nvim affect users config? As I understand, Kickstart is not a plugin, not a distro either, so users don't need to update Kickstart like they update a plugin or distro

@ro0gr
Copy link

ro0gr commented Apr 28, 2025

So why would a change in upstream kickstart.nvim affect users config?

There are reasonable changes over time that I want to stay in sync with, so I regularly pull this repo to catch up. IDK if that the best approach, but it works fine until we start replacing plugins. For me, there should be a good reason(other than popularity) to replace a plugin.

Note, I'm not saying there is no good reason for the change. I just prefer to have such reasons to be listed explicitly.

@corymhall
Copy link

Kickstart is not a plugin, not a distro either, so users don't need to update Kickstart like they update a plugin or distro

100% agree with this. Just my two cents, but I think kickstart should represent "how to configure neovim if you started today". Things are constantly changing in the neovim ecosystem as new neovim versions are released, popular plugins stop being maintained, new plugins are created, etc. I've used neovim for years and I would always have a couple of people with neovim config repos that I would follow to try and get a sense of what a good setup was. Now I mostly use kickstart for that, a reference point to update my configuration.

For me, there should be a good reason(other than popularity) to replace a plugin.

I'm not sure there needs to be a objective reason to replace a plugin. Neovim configuration is all a little subjective and I think it should just be based on what the kickstart maintainers view as the "best" (subjective) starting point. I personally use both snacks and telescope because snacks solved performance issues I was having with telescope, but there are some telescope integrations that don't exist in snacks yet.

@nickgnd
Copy link

nickgnd commented Apr 29, 2025

Thank you all for the kind responses, i really appreciated all the different perspectives ❤️

As newbie, I have to say that i personally find snacks.picker more complete than telescope.

Simple example that made my day: Search File -> insert path/to/file.txt:12 , it opens the file to the selected line, while with telescope I needed to delete the row number (maybe it is possible to handle that with telescope too, but not out of the box).

Cheers ✌️

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.

8 participants