iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📝

Created a Neovim plugin list for proper selection

に公開

A while ago, I summarized the Neovim plugins I'm using,

https://zenn.dev/yutakatay/articles/neovim-plugins-2022

but I thought some people might want to know what kind of competing plugins are available. So, I have compiled a list of Neovim plugins where all the competing plugins are gathered together.

↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

https://github.com/yutkat/my-neovim-pluginlist

↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑

By the way, the table of contents alone is this long.

Kooha-04-24-2022-17-43-09

Why wasn't "awesome" good enough?

Besides this list, "awesome" lists are commonly used for similar purposes. There is a compiled list for Neovim plugins as well:

https://github.com/rockerBOO/awesome-neovim

Disadvantages of Awesome

I also look at "awesome" lists quite often, but to be honest, I'm not a big fan.

The reasons are as follows:

  • Categories aren't well-organized; it's just a long list of information.
  • There isn't enough information to actually choose which one is best.
  • Old plugins or ones that are no longer necessary aren't cleaned up.
  • Since fairness is somewhat important, information added by plugin enthusiasts and non-enthusiasts is treated equally.

How to improve it

  • Categories aren't well-organized; it's just a long list of information.
    • → Enhance categorization. If two or more completely competing plugins exist, create a new category.
  • There isn't enough information to actually choose which one is best.
    • → Add useful selection information (star counts and activity).
    • → Conversely, remove unnecessary things like plugin descriptions (since they mostly contain useless info like "it's fast and easy to use").
  • Old plugins or ones that are no longer necessary aren't cleaned up.
    • → Add the last commit date.
    • → Detect archived repositories using CI.
  • Since fairness is somewhat important, information added by plugin enthusiasts and non-enthusiasts is treated equally.
    • → Put my own recommendations at the top of the category.

That's why I created my own plugin list

To meet the improvement goals mentioned above, I created a list with shields.io badges within Markdown. (I chose this as it was the simplest approach for now, although there might be better ways.)

auto-completion

Taking the auto-completion section as an example, it is clear at a glance that nvim-cmp is the most popular with the highest star count, while coq_nvim is gaining significant momentum.

Currently, the badges in the README are referenced directly from shields.io, so the initial load takes some time. It might be better to have GitHub Actions update it once a day and output it directly to Markdown. To ensure it loads even slightly faster, I have put categories with a large number of plugins into separate files.

I also use snippets (LuaSnip) to minimize the operational burden so that updating doesn't become tedious. With this, you can update it in just 5 seconds by simply pasting the plugin name you found.

	s("badge_link", {
		t({ "- [" }),
		i(1, { "repo/name" }),
		f(function(args, snip)
			return string.format(
				"](https://github.com/%s) ![](https://img.shields.io/github/stars/%s) ![](https://img.shields.io/github/last-commit/%s) ![](https://img.shields.io/github/commit-activity/y/%s)",
				args[1][1],
				args[1][1],
				args[1][1],
				args[1][1]
			)
		end, { 1 }),
	}),

How to get information on new plugins

I think it would be difficult to identify which plugins are newly added just from the list, as you would have to check the commit logs one by one. Therefore, I pick out promising new plugins and tweet about them using the #neovim_plugins hashtag (in Japanese). Feel free to check it out if you're interested.

https://twitter.com/hashtag/neovim_plugins

What do other editors do in the first place?

Other editors (like VS Code) likely face similar challenges when selecting plugins, but the struggle should be much less compared to Neovim. This is because they have a marketplace.

https://marketplace.visualstudio.com/vscode

Categories are well-organized, there are stars for ratings, comments can be submitted, and you can see the number of downloads. Furthermore, you can identify trending or new plugins, making it a perfect environment for choosing plugins.

VS Code users should be more grateful for this system provided for free!

Incidentally, there is a move within the Neovim community to establish a standard specification format for plugins. If this is realized, the day might come when a marketplace-like system is implemented for Neovim as well.

https://github.com/nvim-lua/nvim-package-specification

https://youtu.be/ctwNbfAMheM?t=189

Discussion