Decoupling config from nvim (#1038)

This commit is contained in:
Christian Chiarulli 2021-07-19 22:50:07 -04:00 committed by GitHub
parent acb6a7a2ce
commit d02265175f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 63 additions and 39 deletions

View file

@ -4,7 +4,7 @@ function plugin_loader:init()
local execute = vim.api.nvim_command
local fn = vim.fn
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
local install_path = "~/.local/share/lunarvim/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
execute "packadd packer.nvim"
@ -15,12 +15,15 @@ function plugin_loader:init()
return
end
local util = require "packer.util"
packer.init {
-- package_root = require("packer.util").join_paths(vim.fn.stdpath "data", "lvim", "pack"),
package_root = util.join_paths "~/.local/share/lunarvim/site/pack/",
compile_path = util.join_paths("~/.config/lvim", "plugin", "packer_compiled.lua"),
git = { clone_timeout = 300 },
display = {
open_fn = function()
return require("packer.util").float { border = "single" }
return util.float { border = "single" }
end,
},
}