-
Notifications
You must be signed in to change notification settings - Fork 37.1k
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
base: master
Are you sure you want to change the base?
Feature/snacks picker #1481
Conversation
47c264e
to
9daf9fb
Compare
Also, I can move the stylua changes to a different PR / remove them entirely |
9daf9fb
to
aa93f4d
Compare
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 |
There was a problem hiding this 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.
aa93f4d
to
1ec4080
Compare
Oops, I forgot to copy it from my config 🤦 I also split the style lua changes to a different PR :D |
There was a problem hiding this 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
Hey 👋 I have a couple of questions. Is there any difference between Thank you for your time, cheers ✌️ |
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. |
They both offer similar functionality and pickers.
To be honest, I'm not sure it is preferable. The main advantages I can think of about snacks are:
This was my motivation behind this PR 😄 |
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. |
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. |
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 |
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. |
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.
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. |
Thank you all for the kind responses, i really appreciated all the different perspectives ❤️ As newbie, I have to say that i personally find Simple example that made my day: Search File -> insert Cheers ✌️ |
It's unclear to me whether most people would be in favor of this change. Thanks for the PR though! If I see a groundswell of support I'll merge. |
Just my 2 cents, I tried snacks picker and am going to stick with it. The git log search picker alone has sold me on it. |
@yetyetanotherusername The question is not - "is this shiny and tasty and a thing I want". The question is "Is this something EVERY SINGLE NEW Neovim user MUST start with in order to have a good experience?" |
* The following content was translated from Chinese to English by AI. If there is any ambiguity or misinterpretation, please let me know. Could you record a short video and post it here to demonstrate how Based on the textual description and the repository README, I personally disagree with replacing
|
@SetsuikiHyoryu I've been a bit frustrated by the lack of screenshots/video or even any real exhaustive description on the Snack website as well. |
You can find some screenshots in the dedicated README for snacks.picker. Though I do agree it's still missing more screenshot and videos. |
I do agree that it would have been nicer if it was split into multiple plugins, I don't think it's a blocker for kickstart. If it was,
You don't have to configure anything to disable the other modules. They are all disabled by default, and need to be explicitly enabled in order to run.
In my opinion, the storage space difference is negligible. |
As discussed in by other people in this thread, there are more benefits to snacks.nvim then visual flare.
|
@oriori1703 Good to know, thanks! If more people chime in here and want it merged, I'll merge it! |
Exactly, but since we started to integrate stuff like telescope, there's gonna be some conflicting opinions, and it invites users to use it as a distro instead of a starting point. That's why I propose removing stuff like this, and maybe provide optional configs, or completely do away with those all together. The repo as it is now invites people to use it as a distro. That's why we have a bunch of issues every time something changes, because people fork but use it as a distro. |
I don't think it's a good idea to have a telescope like plugin included but off by default. Out of the box usability is very important for new users. How I understand it is that kickstart is a meta distro, not a distro, cause it does want the user to tinker with it not just install and use it, but it's also not just a documentation or a tutorial, cause it always has been pretty usable out of the box. It should have an effect on the new user like: Wow, this is pretty cool out of the box experience. Let's see if I can change this and that detail and maybe find a plugin that does this or that and add it. All I'm saying is that someone has to decide which plugins go in and which out, doesn't matter if they're on by default or just included like a disabled extra, the decision has to be made by somebody and if the maintainer finds it difficult to do this on his own because of different opinions of the users, he should find a way to delegate this deciding process to the users to make it easier for him. At least that's one way to make it easier to make a decision. There are other ways. But the point is, somebody has to make the decisions, because the starting point for new users has to be up to date. It can't go on using e.g. telescope when nearly all the rest of the nvim users will be using fzf or snacks, which I don't think is the case yet, there are probably still many users of telescope, but in a year or two that may not be the case anymore. |
And that’s the root of the problem—thinking of it as a “meta distro.” As the name suggests, it should be a starting point for people on their Neovim journey. In my opinion the focus should be on providing a minimal, clean base with clearly documented, optional plugins that are easy to enable. Power users can extend it however they like with Lua, while others can just pick and use preconfigured tools straight off the shelf.
Or let's go back to that MR: Having it modular allows us to provide multiple config examples, and we could focus on providing a unified base with multiple options for users to decide on. |
I acknowledge the discussions here, but it's starting to feel off-topic, and there is still no identifiable concensus regarding the original purposes of the PR. Should this be moved to its own issue? |
To bring it back to the original PR, for me the issue is:
My motivation for advocating for merging this PR is not any effect it would have on my own configuration—I switched to snacks.picker a couple months ago and have no personal need for this to be merged. My motivation is entirely that I want new Neovim users to be set down the path of creating the best possible configuration for themselves, and from my own experience, I don't believe Telescope serves that purpose well. |
I just disagree with a couple of points, or dont follow it.
For me disc storage does not matter.
I might miss something, but as of now, the latest commit to the snacks happened 4 month ago, while telescope had it's latest commit a month ago, according to their main branches. So this point feels a bit unfair to me. |
I'm really wondering if the PR to kickstart-modular is necessary. Personally, I don't think this is the best way to go about this whole thing.
I said this is starting to be off-topic because what actually needs to be addressed first is meta to the repo as a whole. We need better documentation and guidelines regarding contribution, as well as processes and criteria for things like plugin replacements. Specifically, I'd like to suggest the following:
I believe efforts toward these points are more actionable at the moment, will result in quicker resolving of such issues in the future, and make the repo easier to maintain. |
I don’t agree that Telescope is a bad picker. I use it with ripgrep and fd, and I don’t see any real speed issues. Customization has also been straightforward for me—it has a large community and lots of examples. |
I can see why it looks this way. The maintainer of snacks.nvim, @folke, who is also the maintainer of lazy.nvim,which is kickstart's plugin manager, as well as which-key.nvim, lazydev.nvim, tokionight.nvim, and todo-comments.nvim, all of which are used by kickstart, is currently on vacation. If you look at the commit log before he went on vacation you'll see very active history.
I also use rg and fd and had performance issues with Telescope on our large monorepo (M1 Max, 64 GB). On small projects Telescope's performance is fine, but I don't think we should assume that is sufficient for new users. |
I prefer Snacks.picker over Telescope, but I'm still using Telescope for |
I've been thinking about how to make this optional, so the default config still uses Telescope, but we can optionally replace it. I'm not really sure how best to approach this though, since it's not something we can easily toggle like neo-tree. It overrides some built-in behavior directly. I asked ChatGPT and it suggested this snippet:
I haven't tested this yet, mostly because it feels like it goes against what Kickstart is aiming for. Do you guys have any ideas on how we approach this kind of thing in general? Not just this specific plugin, but more broadly when we want to offer options for something built-in while keeping the default setup clean. (This all would be so much easier if the decision for having a modular approach in general was made back when it came up) |
@szechp if (telescope)
require 'kickstart.plugins.telescope',
else if (snacks)
require 'kickstart.plugins.snacks',
else
require 'kickstart.plugins.fzf-lua', Users can select one of them or everything after tweaking the conditions. |
Wouldn't we have to specify those variables then somewhere in the config? 🫠 This all doesn't seem very Kickstarter like to me. I know you probably are tired of me saying this by now, we wouldn't have all this discussions with a modular setup 😅 |
@szechp We already have a practice. See below. |
I do not agree that It should only be about documentation and a simple configuration that keeps up with core neovim. The plugin set is really irrelevant, as long as it reflects the current state of neovim and its plugin ecosystem, as well as what features turn out to be largely beneficial or unanimously accepted in modern software dev. Everything else is deferred to user preference. Providing 2 or more file picker configs is out of scope, it's maintenance burden, and would probably just lead to more PRs wanting to get their plugin-of-the-week in. I'd agree that it should be easier to switch out plugins if a user wants to, but I'd insist that the solution for this is more proper documentation about how to write your own configs (as well as, again, reconsidering a restructuring effort #473) instead of providing and maintaining multiple configs for same-feature plugins, engineering a framework for managing them and their dependencies, and then making sure any combination of enabled plugins play well with each other. |
I’d like to share a suggestion: Core init.lua should only include a minimal set of essential plugins (e.g. LSP, Mason, colorscheme, treesitter, basic utils). Everything else ( git plugins, formatting, etc.) could live in a kickstart/plugins/ folder as optional modules: Users can enable a module by simply importing it. Each plugin lives in its own file — so the base config stays clean and lightweight. We could also have a community/plugins/ folder where third-party or contributed modules live: Why this could help: Keeps the core setup minimal and approachable for beginners. Reduces discussion around preferred plugins — people only load what they want. The folder community/plugins/ folder could serve as a place for suggested plugin setups and extra integrations: A great help for people new to Neovim who want to explore common tools. Contributors could share their own configs there — without bloating the core. Since Kickstart is not a full distribution but a starter configuration, this distinction reinforces its strength: simplicity and approachability. |
Exactly, it doesn't make any sense to include alternative same feature plugins in kickstart. If it isn't obvious that there might be other similar plugins, one comment saying "You can install other plugins or even replace plugins that are already included with similar plugins" or something like that would be enough. I mean people who want to use kickstart want to learn (or they're using the wrong "distro"), so they should be ready to google things or ask AI, if a similar plugin to e.g. telescope exists. If somebody wants a list of quality nvim plugins, there's always this repo: If somebody really needs kickstart to be more distro like, he should just create a fork and name it kickstart++ or whatever, so it is clear from the name that it is similar to kickstart but has more stuff included. |
i just explicitly set there is now an entirely optional snacks.lua file, that can be enabled by anyone if they want it. It's in the same folder as neo-tree and other optional plugins. I hope this satisfies every camp, both the purist but also the ones that like to try their new shiny plugins. |
It's been a while since I last responded to this this 😊 .
Kickstart is aimed at beginners who want to learn and therefore should not have a complicated plugin system that will overwhelm beginners with the choice of which plugins they want, before they even know what half of the plugins do (or even how to use vim). IMO the best approach is to only have one file picker plugin. In the absence of a decision I think @szechp's solution is a good compromise because it is well documented (but a bit worse then just choosing one of the pickers). |
Mostly agreed, although I don't think kickstart should offer a choice. Beginners aren't going to have an opinion on which they prefer. Also key is @carloscalla's comment:
Merging this PR does not force anyone currently using and happy with telescope to switch. Updates to this repo are about what's best for new users, not existing users. |
I could split my PR: I think it's essential to get telescope out of the lsp config. Telescope is just too deeply integrated. It should be easy to remove a plugin, without going through the trouble to look for cross plugin dependencies. At least for a picker. |
I've gotten around to doing this now: |
I've been thinking about plugin configurations in kickstart.nvim, and I wanted to suggest the idea of creating a wiki to collect and share how to add and configure plugins, including how to replace existing ones within Kickstart's structure. This PR actually got me curious, and I ended up migrating to snacks.nvim, even enabling its file explorer. While experimenting, I realized how useful it would be to have a central place with examples and guidance. Some setups can be quite complex. For example, I spent a long time figuring out how to properly integrate Java development tools, including Spring Boot, debugging, SonarLint, and so on. I believe a community-maintained wiki could really help others by providing direction and saving time, especially for those trying to extend Kickstart in more advanced ways. It could also help reduce (or even eliminate) PRs that are primarily about swapping or adding plugins, by offering a clear, shared space for plugin suggestions and configuration examples. |
See my previous suggestions above, I think enabling Discussions would be a better fit for this. #1481 (comment) |
This is how folke does it for most of his plugins. People could just post their configs there. |
This is really nice! I took a look at how LazyVim handles this, and I think the way they organize things under Discussions is very effective. In particular, the "Recipes" category there helps a lot, it solves exactly the kind of issues we often see with PRs about adding or replacing plugins. Having a structured forum or discussion space like that could make everything flow much more smoothly and keep the repository clean. |
Switch from
telescope
tosnacks.nvim
.Benefits of snacks compiled from the comments:
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
andsnacks.indent
to replaceneo-tree
andindent-blanklines