From 4709b4eb28869fc8825cb191aa18e37394ced1ea Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Mon, 14 Aug 2017 01:15:42 -0400 Subject: [PATCH] Add updated ycm config --- applications/youcompleteme-old.sh | 20 +++++++++++++++++++ applications/youcompleteme.sh | 33 ++++++++++++++----------------- 2 files changed, 35 insertions(+), 18 deletions(-) create mode 100755 applications/youcompleteme-old.sh diff --git a/applications/youcompleteme-old.sh b/applications/youcompleteme-old.sh new file mode 100755 index 0000000..ffaf515 --- /dev/null +++ b/applications/youcompleteme-old.sh @@ -0,0 +1,20 @@ +#!/bin/zsh +if [ ! "$1" = "-y" ]; then + # They want to assume yes, require no user input + echo "Make sure this is in your .vimrc" + echo "Plug 'https://github.com/Valloric/YouCompleteMe'" + echo -n "Press enter to continue..." + read a +fi +rm -rf ~/ycm_build +mkdir ~/ycm_build +cd ~/ycm_build +touch .nobackup +cmake -G "Unix Makefiles" . ~/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp +cmake --build . --target ycm_core +#cd ~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode +#go build +#cd ~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime +#npm install --production +cd - +echo "It should be done." diff --git a/applications/youcompleteme.sh b/applications/youcompleteme.sh index ffaf515..f9ca27b 100755 --- a/applications/youcompleteme.sh +++ b/applications/youcompleteme.sh @@ -1,20 +1,17 @@ -#!/bin/zsh -if [ ! "$1" = "-y" ]; then - # They want to assume yes, require no user input - echo "Make sure this is in your .vimrc" - echo "Plug 'https://github.com/Valloric/YouCompleteMe'" - echo -n "Press enter to continue..." - read a +#!/bin/bash +# Make sure this is in your .vimrc +# Plug 'https://github.com/Valloric/YouCompleteMe' +pushd ~/.vim/plugged/YouCompleteMe +echo "Compiling with clang support..." +ARGS="--clang completer" +if command -v cargo 2>&1 > /dev/null && command -v rustc 2>&1 > /dev/null; then + echo "Compiling with rust support..." + ARGS="$ARGS --racer-completer" fi -rm -rf ~/ycm_build -mkdir ~/ycm_build -cd ~/ycm_build -touch .nobackup -cmake -G "Unix Makefiles" . ~/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp -cmake --build . --target ycm_core -#cd ~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode -#go build -#cd ~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime -#npm install --production -cd - +if command -v go 2>&1 > /dev/null; then + echo "Compiling with go support..." + ARGS="$ARGS --gocode-completer" +fi +./install.py --clang-completer +popd echo "It should be done."