From c87784dc149169b115b10a362d7474890703cf3d Mon Sep 17 00:00:00 2001 From: Jim Richter Date: Thu, 19 Aug 2021 16:02:46 +0200 Subject: [PATCH] some fixes --- configs/init.lua | 11 ++++++----- install/install-nvim.sh | 3 --- setup.sh | 16 ++++++++++++++-- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/configs/init.lua b/configs/init.lua index e53dc05..01f02c1 100644 --- a/configs/init.lua +++ b/configs/init.lua @@ -50,7 +50,8 @@ g.NERDTreeMinimalUI = true g.NERDTreeDirArrows = true g.hidden = true g.material_theme_style = "ocean_community" -if u.has_plugin("material") + +if u.has_plugin("material") then vim.cmd [[colorscheme material]] end -- Remove background color @@ -62,15 +63,15 @@ g.mapleader = " " require "keymappings" -- Treesitter config -if u.has_plugin("nvim-treesitter") +if u.has_plugin("nvim-treesitter") then require "nvim-treesitter.configs".setup {ensure_installed = "maintained", highlight = {enable = true}} end -- Toggleterm / Lazygit setup -if u.has_plugin("toggleterm") +if u.has_plugin("toggleterm") then require "lazy-git" end -- Autocommands -if u.has_plugin("NERDTree") +if u.has_plugin("NERDTree") then u.create_augroup( { {"VimEnter", "*", "if (@% == '') | NERDTree | endif"}, @@ -81,7 +82,7 @@ if u.has_plugin("NERDTree") end -- Autocompletion Setup -if u.has_plugin("compe") +if u.has_plugin("compe") then require "autocomplete" end diff --git a/install/install-nvim.sh b/install/install-nvim.sh index 3330666..26fa656 100755 --- a/install/install-nvim.sh +++ b/install/install-nvim.sh @@ -8,8 +8,5 @@ mkdir -p $HOME/.config/nvim ln -s "$HOME/.dotfiles/configs/init.lua" "$HOME/.config/nvim/init.lua" ln -s "$HOME/.dotfiles/configs/lua" "$HOME/.config/nvim/lua" -echo " - installing paq-nvim" -sh -c 'git clone --depth=1 https://github.com/savq/paq-nvim.git "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/paqs/start/paq-nvim' - echo " - installing vim plugins" nvim --headless +PaqSync +qa diff --git a/setup.sh b/setup.sh index 399216a..f4b5c9f 100755 --- a/setup.sh +++ b/setup.sh @@ -43,8 +43,20 @@ echo "-- what do you want to install? --" # 6 - ZSH # 7 - ZSH -OPTIONS_VALUES=("ZSH" "NVIM" "ASDF" "DRNV" "NODE" "GO" "PYTH" "DENO" "HUGO" "RUST") -OPTIONS_LABELS=("zsh + oh-my-zsh" "Neovim" "Asdf" "Direnv" "NodeJS" "Golang" "Python" "Deno" "Hugo" "Rust") +OPTIONS_VALUES=( + "ZSH" + "NVIM" + "ASDF" + "DRNV" + "NODE" + "GO" + "PYTH" + "DENO" + "HUGO" + "RUST" + ) + +OPTIONS_LABELS=("zsh + oh-my-zsh" "Neovim (Requires asdf)" "asdf" "Direnv" "NodeJS" "Golang" "Python" "Deno" "Hugo" "Rust") for i in "${!OPTIONS_VALUES[@]}"; do OPTIONS_STRING+="${OPTIONS_VALUES[$i]} (${OPTIONS_LABELS[$i]});" done