From ac6be60d952e6d3d75bc004d02eb531c9e76dde6 Mon Sep 17 00:00:00 2001 From: Jim Richter Date: Thu, 19 Aug 2021 16:09:20 +0200 Subject: [PATCH] feat some stuff --- configs/init.lua | 8 ++++++-- setup.sh | 37 +++++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/configs/init.lua b/configs/init.lua index 01f02c1..4d43e8c 100644 --- a/configs/init.lua +++ b/configs/init.lua @@ -87,10 +87,14 @@ if u.has_plugin("compe") then end -- LSP Config -local lsp_utils = require "lsp-utils" +if u.has_plugin("lspconfig") then + +require "lsp-utils" opt.completeopt = {"menuone", "noinsert", "noselect"} opt.shortmess:append({c = true}) -- Autoformat -require "autoformatter" \ No newline at end of file +require "autoformatter" + +end \ No newline at end of file diff --git a/setup.sh b/setup.sh index f4b5c9f..f211765 100755 --- a/setup.sh +++ b/setup.sh @@ -9,27 +9,32 @@ cd "$(dirname "$0")" . ./helpers/asdf-install.sh --source-only echo "-- welcome to my setup script --" -echo "-- installing prerequesits (git, curl) --" -INTERACTIVE=$(tty -s && echo "true" || echo "false") +if [ "$(which git)" = "" ] && ["$(which curl)" = ""]; then -if [ $INTERACTIVE = "true" ]; then - if [ "$(prompt " - do you want to continue")" != "yes" ]; then - echo " alllrighty then, byyye" - exit + echo "-- installing prerequesits (git, curl) --" + + INTERACTIVE=$(tty -s && echo "true" || echo "false") + + if [ $INTERACTIVE = "true" ]; then + if [ "$(prompt " - do you want to continue")" != "yes" ]; then + echo " alllrighty then, byyye" + exit + fi fi + + echo "" + + #Prerequesits + echo "-- installing prerequisites --" + + install git + install curl + + echo "-----------------------------------" + fi -echo "" - -#Prerequesits -echo "-- installing prerequisites --" - -install git -install curl - -echo "-----------------------------------" - #Make the selection echo "-- what do you want to install? --"