diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8f61424..c91cfd5 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -10,6 +10,7 @@ endif call plug#begin('~/.local/share/nvim/plugged') Plug 'airblade/vim-gitgutter' " git upgrades +Plug 'alaviss/nim.nvim' , {'for': 'nim'} " Highlighting for nim Plug 'alvan/vim-closetag' " auto close HTML tags Plug 'donRaphaco/neotex' , {'for': 'tex'} " asynchronous pdf rendering Plug 'frazrepo/vim-rainbow' " colorized matching brackets @@ -276,6 +277,7 @@ autocmd BufWritePre * :call TrimWhitespace() autocmd BufRead,BufNewFile *.tex set filetype=tex autocmd BufRead,BufNewFile *.html set filetype=html autocmd BufRead,BufNewFile *.h set filetype=c +autocmd BufRead,BufNewFile *.nim set filetype=nim " formatting options autocmd FileType java setlocal shiftwidth=2 softtabstop=2 @@ -287,6 +289,7 @@ autocmd FileType html noremap :silent %!tidy -q -i --show-errors 0 autocmd FileType java setlocal formatprg=astyle\ --indent=spaces=2\ --style=google autocmd FileType java noremap gggqG autocmd FileType markdown noremap :silent %!prettier --stdin-filepath % +autocmd FileType nim noremap :silent !nimpretty % autocmd FileType python setlocal formatprg=autopep8\ - autocmd FileType python noremap gggqG autocmd FileType tex,latex setlocal formatprg=latexindent\ - diff --git a/.local/bin/tools/nvim/compiler b/.local/bin/tools/nvim/compiler index ce47e88..2672119 100755 --- a/.local/bin/tools/nvim/compiler +++ b/.local/bin/tools/nvim/compiler @@ -32,6 +32,7 @@ case "$file" in *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; *config.h) sudo make install ;; *\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;; + *\.nim) nim c "$file" && "$base" ;; *\.py) python "$file" ;; *\.go) go run "$file" ;; *\.sent) setsid sent "$file" 2>/dev/null & ;; diff --git a/.profile b/.profile index c811966..5018443 100644 --- a/.profile +++ b/.profile @@ -3,6 +3,7 @@ # Adds `~/.local/bin` and all subdirectories to $PATH export PATH="$PATH:$(du "${HOME}/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" +export PATH=/home/user/.nimble/bin:$PATH export BROWSER="icecat" export RTV_BROWSER="qutebrowser"