Skip to content
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

Configure packer_compiled.lua to be stored on XDG_DATA_DIRS #138

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,23 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd [[packadd packer.nvim]]
end

require('packer').startup(function(use)
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
local status_packer_util_ok, packer_util = pcall(require, "packer.util")
if not status_packer_util_ok then
return
end

-- Have packer use a popup window
packer.init({
package_root = packer_util.join_paths(vim.fn.stdpath('data'), 'site', 'pack'),
compile_path = packer_util.join_paths(vim.fn.stdpath('data'), 'site', 'plugin', 'packer_compiled.lua'),
})

packer.startup(function(use)
-- Package manager
use 'wbthomason/packer.nvim'

Expand Down