Skip to content

Commit

Permalink
Merge pull request #18 from Abstract-IDE/main
Browse files Browse the repository at this point in the history
[setup.py] setup packer using installation script
  • Loading branch information
shaeinst authored Jul 2, 2022
2 parents a41af4e + cc31dc3 commit 39ad87c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,20 @@ def compile_nvim():
# -------------------------------


# -------------------------------
def setup_packer():
nvim_plugin_dir = str(f"{HOME}/.local/share/nvim/site/pack/packer/start")
packer_dir = nvim_plugin_dir+"/packer.nvim"
if not Path(packer_dir).exists():
print("\nsetting up packer...")
if not Path(nvim_plugin_dir).exists():
Path(nvim_plugin_dir).mkdir(parents=True)

repository = "https://github.com/wbthomason/packer.nvim"
subprocess.run(["git", "clone", "--depth", "1", repository], cwd=nvim_plugin_dir)
# -------------------------------


# -------------------------------
def remove_no_require():
subprocess.run(["rm", "-rf", ".git*", "LICENSE", "README.md", "setup.py", ".__*"],
Expand Down Expand Up @@ -191,6 +205,7 @@ def main():

# compile configs
try:
setup_packer()
print("\ncompiling config and plugins...")
subprocess.run(["git", "checkout", "release-0.7"], cwd=NVIM_CONF_PATH)
compile_nvim()
Expand Down

0 comments on commit 39ad87c

Please sign in to comment.