Browse Source

Update neovim configuration and allow clang-format

Taylor Bockman 5 years ago
parent
commit
1906a56b4e
  1. 1
      dotfiles/bash/bash_profile
  2. 32
      dotfiles/config/nvim/init.vim

1
dotfiles/bash/bash_profile

@ -10,6 +10,7 @@ export CXX=$(which clang++)
export OPENSSL_ROOT_DIR=$(which openssl)
alias python='python3'
alias vim='nvim'
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi

32
dotfiles/config/nvim/init.vim

@ -63,6 +63,8 @@ Plug 'isRuslan/vim-es6'
" Flake8 Integration
Plug 'nvie/vim-flake8'
" Clang Formatting
Plug 'rhysd/vim-clang-format'
" SBT integration for vim
Plug 'ktvoelker/sbt-vim'
@ -97,25 +99,10 @@ Plug 'christoomey/vim-tmux-navigator'
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
" Snippet Support/Configuration
" Currently disabled because it irrepairably causes neovim to detonate more
" than I care to deal with as of 5/26/2017
"Plug 'SirVer/ultisnips'
"Plug 'honza/vim-snippets'
" Database engine support
Plug 'https://github.com/vim-scripts/dbext.vim'
"let g:UltiSnipsExpandTrigger="<c-s>"
"let g:UltiSnipsJumpForwardTrigger="<c-b>"
"let g:UltiSnipsJumpBackwardTrigger="<c-z>"
"let g:UltiSnipsSnippetsDir=["~/.config/nvim/plugged/vim-snippets/UltiSnips", "~/.config/nvim/snippets"]
"" Allow UltiSnips to split the window vertically
"let g:UltiSnipssEditSplit="vertical"
"""""""""""""""""""""""""""""""
" end plugin list
call plug#end()
@ -152,7 +139,17 @@ endfunc
" Autocmds
" Stripping trailing whitespace on save
" Auto Clang Formatting
autocmd FileType c ClangFormatAutoEnable
autocmd FileType cpp ClangFormatAutoEnable
autocmd FileType cxx ClangFormatAutoEnable
autocmd FileType h ClangFormatAutoEnable
autocmd FileType hpp ClangFormatAutoEnable
autocmd FileType hxx ClangFormatAutoEnable
""" Stripping trailing whitespace on save
autocmd BufWritePre * :%s/\s\+$//e
" Fix rust
@ -165,6 +162,9 @@ autocmd BufNewFile,BufRead *.py setlocal colorcolumn=80
" Set Python syntax checking to Python3
let python_highlight_all=1
" Make tabs display as 4 spaces for Python files (makes them easier to read)
autocmd BufNewFile,BufRead *.py setlocal noexpandtab tabstop=4 shiftwidth=4
" Indent YAML files correctly
au FileType yaml setlocal tabstop=2 expandtab shiftwidth=2 softtabstop=2

Loading…
Cancel
Save