From e38cddf10752a13361aaf3e0bb691daa829a2526 Mon Sep 17 00:00:00 2001 From: Luke Tidd Date: Tue, 16 May 2023 23:16:52 -0400 Subject: [PATCH] testing out nvchad --- setup_from_scratch | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/setup_from_scratch b/setup_from_scratch index 3da4bd0..b972bb2 100755 --- a/setup_from_scratch +++ b/setup_from_scratch @@ -1,6 +1,29 @@ #!/bin/bash -manager=paq +manager=nvchad + +function nvchad_setup() { + nvchad_git='https://github.com/NvChad/NvChad' + config_root="${nvim_data[config_dir]}" + custom="${config_root}/lua" + git clone "$nvchad_git" "$config_root" --depth 1 + if [[ $? != 0 ]]; then + printf 'Failed to clone\n' >&2 + exit 1 + fi + printf 'nvchad is cloned into %s\n' "$config_root" + if ! type gclone &>/dev/null; then + printf 'manually clone nvchad config into %s\n' "$custom" >&2 + exit 1 + fi + cd "$custom" + gclone nvchad + ln -s nvchad custom + printf 'Config should be cloned into %s, linked to %s\n' \ + "${custom}/nvchad" \ + "${custom}/config" + # nvim --headless -c 'autocmd User MesonInstallAll quitall' -c 'PackerSync' +} function paq_setup() { git clone --depth=1 https://github.com/savq/paq-nvim.git \ @@ -21,6 +44,7 @@ function packer_setup() { rm "${nvim_data[config_dir]}/init.lua" } +# Start . nvim_data ./remove_all mkdir -p "${nvim_data[config_dir]}" @@ -32,4 +56,7 @@ case "$manager" in packer) packer_setup ;; + nvchad) + nvchad_setup + ;; esac