Skip to content

Instantly share code, notes, and snippets.

@Xanewok
Created November 28, 2018 14:41
Show Gist options
  • Save Xanewok/fd87557d1b946ca4590da35bf41139ec to your computer and use it in GitHub Desktop.
Save Xanewok/fd87557d1b946ca4590da35bf41139ec to your computer and use it in GitHub Desktop.
#!/bin/bash
(>&2 echo "Running custom RLS wrapper")
# Generate a unique log filename
TODAY="$( date +"%Y%m%d" )"
NUMBER=0
HOMEDIR=$(eval "echo ~")
while [ -f "$HOMEDIR/rls-$TODAY$SUFFIX.log" ]; do
(( ++NUMBER ))
SUFFIX="$( printf -- '-%02d' "$NUMBER" )"
done
FNAME="$HOMEDIR/rls-$TODAY$SUFFIX.log"
#RLS_PATH=/home/xanewok/repos/rls/target/debug/rls
RLS_PATH=rls
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
# export RUST_LOG=rls::
# export RUST_LOG=rls::server=trace,rls::actions=trace,rls-vfs=trace
export RUST_LOG="rls_vfs,rls::server,rls::actions"
export RUST_BACKTRACE=full
$RLS_PATH "$@" 2>> $FNAME
#cd /home/xanewok/repos/rls
#cargo build
#RUST_LOG="rls=trace,rls_analysis=error" ./target/debug/rls "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment