1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2026-02-14 17:14:47 +01:00

nvim: added go shells to compiler script

This commit is contained in:
2026-01-31 09:16:22 +01:00
parent 4e8a537c32
commit 0103b382ad

View File

@@ -26,27 +26,28 @@ textype() { \
}
case "$file" in
*\.vpr) $vipercmd "$file" ;;
*\.ms) refer -PS -e "$file" | groff -me -ms -kept -T pdf > "$base".pdf ;;
*\.mom) refer -PS -e "$file" | groff -mom -kept -T pdf > "$base".pdf ;;
*\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;;
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
*\.m) octave -qW "$file" ;;
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
*config.h) sudo make install ;;
*\.tex) textype "$file" ;;
*\.java) java "$file" ;;
*\.js) node "$file" ;;
*\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;;
*\.nim) nim c -r -d:noColors "$file" ;;
*\.py) python3 "$file" ;;
*\.go) go run "$file" ;;
*\.lua) lua "$file" ;;
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
*\.mom) refer -PS -e "$file" | groff -mom -kept -T pdf > "$base".pdf ;;
*\.ms) refer -PS -e "$file" | groff -me -ms -kept -T pdf > "$base".pdf ;;
*\.py) python3 "$file" ;;
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
*\.sent) setsid sent "$file" 2>/dev/null & ;;
*config.h) sudo make install ;;
*\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;;
*\.java) java "$file" ;;
*\.js) node "$file" ;;
*\.m) octave -qW "$file" ;;
*\.nim) nim c -r -d:noColors "$file" ;;
*\.r|*\.R) Rscript "$file" ;;
*\.smt2) z3 "$file" ;;
*\.rs) (cd "$dir" && cargo locate-project >/dev/null 2>&1) \
&& (cd "$(dirname "$(cd "$dir" && cargo locate-project --message-format plain)")" && cargo run) \
|| (rustc "$file" && "./$(basename "${file%.rs}")") ;;
*\.sh) dash "$file" ;;
*\.smt2) z3 "$file" ;;
*\.tex) textype "$file" ;;
*\.vpr) $vipercmd "$file" ;;
*) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
esac