diff --git a/home/.chezmoiscripts/run_once_after_30-install-lvim.sh.tmpl b/home/.chezmoiscripts/run_once_after_30-install-lvim.sh.tmpl index 125b4c0..f03b742 100644 --- a/home/.chezmoiscripts/run_once_after_30-install-lvim.sh.tmpl +++ b/home/.chezmoiscripts/run_once_after_30-install-lvim.sh.tmpl @@ -7,11 +7,10 @@ # LVim version lvim_version="1.4" -{{- if (and (ne .hasNVim false) (ne .hasLatex false)) }} +{{- if (and (ne .hasNVim false) (ne .hasLVim false)) }} log "Begin LVim installation" - install_binary "tree-sitter-cli" "yay" LV_BRANCH="release-${lvim_version}/neovim-0.9" bash <(curl -s "https://raw.githubusercontent.com/LunarVim/LunarVim/release-${lvim_version}/neovim-0.9/utils/installer/install.sh") log "Finish LVim installation" diff --git a/home/.chezmoiscripts/run_once_onchange_10-install-packages.sh.tmpl b/home/.chezmoiscripts/run_once_onchange_10-install-packages.sh.tmpl index 9714d74..1160553 100644 --- a/home/.chezmoiscripts/run_once_onchange_10-install-packages.sh.tmpl +++ b/home/.chezmoiscripts/run_once_onchange_10-install-packages.sh.tmpl @@ -10,6 +10,10 @@ args="--base --zsh" args="${args} --nvim" {{- end }} +{{- if (ne .hasLVim false) }} + args="${args} --lvim" +{{- end }} + {{- if (ne .hasLatex false) }} args="${args} --latex" {{- end }} @@ -19,7 +23,7 @@ args="--base --zsh" log "Begin Arch/Manjaro Linux packages installation" - . {{ .chezmoi.workingTree }}/scripts/archlinux.sh ${args} + . {{ .chezmoi.workingTree }}/scripts/manjaro.sh ${args} log "Finish Arch/Manjaro Linux packages installation" diff --git a/scripts/archlinux.sh b/scripts/manjaro.sh similarity index 87% rename from scripts/archlinux.sh rename to scripts/manjaro.sh index 573deb8..bdf0cda 100644 --- a/scripts/archlinux.sh +++ b/scripts/manjaro.sh @@ -14,6 +14,13 @@ usage() { } # packages to install +install_default() { + packages=( + base-devel + git + ) +} + install_base() { packages=( bubblewrap @@ -41,6 +48,15 @@ install_nvim() { ) } +install_lvim() { + packages+=( + nodejs + python + rust + tree-sitter-cli + ) +} + install_zsh() { packages+=( zsh @@ -64,6 +80,7 @@ install_latex() { # cli options BASE=false NVIM=false +LVIM=false ZSH=false LATEX=false @@ -76,6 +93,7 @@ while [ "$#" -gt 0 ]; do case "$1" in --base) BASE=true ;; --nvim) NVIM=true ;; + --lvim) LVIM=true ;; --zsh) ZSH=true ;; --latex) LATEX=true ;; *) @@ -87,8 +105,10 @@ while [ "$#" -gt 0 ]; do done main() { + install_default "$BASE" && install_base "$NVIM" && install_nvim + "$LVIM" && install_lvim "$ZSH" && install_zsh "$LATEX" && install_latex