nvim: added js support

master
TiynGER 4 years ago
parent aab1727052
commit 32c4f82c30

@ -127,6 +127,7 @@ let g:coc_global_extensions = [
\ 'coc-markdownlint',
\ 'coc-pyright',
\ 'coc-sh',
\ 'coc-tsserver',
\ 'coc-vimtex',
\ ]
@ -333,6 +334,7 @@ autocmd BufRead,BufNewFile *.nim set filetype=nim
" formatting options
autocmd FileType java setlocal shiftwidth=2 softtabstop=2
autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2
autocmd FileType markdown setlocal shiftwidth=2 softtabstop=2
" formatting programs

@ -31,9 +31,10 @@ case "$file" in
*\.m) octave -qW "$file" ;;
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
*config.h) sudo make install ;;
*\.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) python "$file" ;;
*\.py) python3 "$file" ;;
*\.go) go run "$file" ;;
*\.sent) setsid sent "$file" 2>/dev/null & ;;
*) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;

Loading…
Cancel
Save