wbthomason/packer.nvim

Do not put compiled loader in stdpath('config')

Open

#201 opened on Feb 7, 2021

View on GitHub
 (19 comments) (19 reactions) (0 assignees)Lua (264 forks)batch import
enhancementgood first issuepacker-compilev1

Repository metrics

Stars
 (8,097 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Currently, packer puts the compiled loader script in stdpath('config')/plugins. Since I sync stdpath('config') across multiple machines, this often leads to conflicts on :PackerSync.

Since the script is generated from user config, I believe it would be more appropriate to put it in stdpath('cache') or stdpath('data') (where rplugin.vim is placed, for example). In particular, the latter would be easy to handle without new logic by just putting it in, say .local/share/nvim/site/pack/loader/start/packer/plugin/ instead of .config/nvim/plugin. (I tested this.)

(Vim packages allow multiple parallel pack/**/start directories, all of which are automatically visible to vim. In fact, I believe the original idea for packages was that each package would have its own pack/<package>/start and pack/<package>/opt directory, where start serves as a replacement for autoload.)

Contributor guide