[Plugin] (neo)vim plugins manager: packer | www-gem words

www-gem words

[Plugin] (neo)vim plugins manager: packer

Published on

Edits:
    - on 2024-09-07: With deprecation of packer, I have now moved to lazy.nvim (the plugin manager, not lazyvim)
    

vim When moving back to vim after few years “ignoring” it, I quickly moved to neovim and embraced the lua language which “pushed” me to use packer as my plugins manager of choice. It exists a lot of (neo)vim plugins managers with different advantages/drawbacks balance depending on your needs. While I used vim-plug back in the days, I decided to move to packer because it offers:

╭── Features I use

  • Declarative plugin specification
  • Support for dependencies
  • Uses native packages
  • Extensible
  • Written in Lua, configured in Lua
  • Post-install/update hooks
  • Uses jobs for async installation
  • Support for local plugins

What I especially makes packer a no brainer for me is that:

  • it fits my full lua neovim config
  • you can manage all your plugins in one single file
  • the syntax is extremely simple:
use '*maintainer_name*/*package_name*' # to install a plugin

 require('*package_name*') # to manage dependencies
  • plugins’ github pages always have a default template if specific configurations is required

╭── Features I have tried

  • Support for git tags, branches, revisions, submodules

I’m certainly a nerd but not a git one :) I use codeberg BTW. There are a lot of git-related plugins to manage your repository(ies) with (neo)vim.

╭── More features than I need

  • Expressive configuration and lazy-loading options
  • Automatically compiles efficient lazy-loading code to improve startup time
  • Support for Luarocks dependencies

I should probably spend some time digging into the benefits of these features but days are too short and my laziness is too big.

╭── Sharing a small trick

Adding nvim --headless -c 'PackerSync' in your .xinitrc will automatically update your plugins in the background at each boot of your machine.


More food for thoughts? Check other posts about: #(Neo)vim #(Neo)vim-Plugins


Thanks for your read. Hope it's been useful to you.


Interact with this post using Mastodon or

Comment on wwwgem's post

Copy and paste this URL into the search field of your favourite Fediverse app or the web interface of your Mastodon server.

✄ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈