dotfiles/nvim/.config/nvim/init.vim

93 lines
2.4 KiB
VimL
Raw Normal View History

2016-10-21 02:38:04 +00:00
call plug#begin()
" plugins
2016-10-21 02:38:04 +00:00
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'airblade/vim-gitgutter'
2016-10-21 21:36:11 +00:00
Plug 'chrisbra/sudoedit.vim'
2016-11-21 20:51:48 +00:00
Plug 'vim-syntastic/syntastic'
2017-01-21 05:09:43 +00:00
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' }
2017-05-15 19:28:52 +00:00
Plug 'mtscout6/syntastic-local-eslint.vim'
2016-10-21 02:38:04 +00:00
call plug#end()
2016-10-21 02:38:04 +00:00
" use UTF-8 encoding
2016-10-21 22:21:44 +00:00
set encoding=utf-8
" view line numbers
2016-10-21 02:38:04 +00:00
set number
" display
2016-10-29 05:09:40 +00:00
set tabstop=4
set shiftwidth=4
set expandtab
2016-10-29 05:09:40 +00:00
"set softtabstop=4
2016-11-21 20:51:48 +00:00
" show tabs, trailing space & EOL
2016-10-29 05:09:40 +00:00
set listchars=tab:▸\ ,trail,eol
set list
2016-11-21 20:51:48 +00:00
"use system clipboard
set clipboard+=unnamedplus
" disable UDLR keys (prefer HJKL)
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
2017-08-12 04:34:06 +00:00
" vim-airline - solarized + powerline
let g:airline_theme='solarized'
let g:airline_solarized_bg='dark'
let g:airline_powerline_fonts = 1
2016-11-21 20:51:48 +00:00
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
2016-10-21 22:21:44 +00:00
set laststatus=2
2016-10-21 02:38:04 +00:00
2017-08-12 04:34:06 +00:00
" enable syntax highlighting
2016-10-21 22:21:44 +00:00
syntax enable
2016-10-29 05:09:40 +00:00
let g:load_doxygen_syntax=1
2016-11-01 07:25:58 +00:00
" enable filetype plugins
2017-04-14 03:23:37 +00:00
filetype plugin indent on
autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab
autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab
2016-11-01 07:25:58 +00:00
2016-12-08 22:44:22 +00:00
" enable nvim-specific inccommand
if has('nvim')
set inccommand=nosplit
endif
2016-11-21 20:51:48 +00:00
" syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" checkers
let g:syntastic_c_checkers = ['gcc', 'cppcheck']
let g:syntastic_cpp_checkers = ['gcc', 'cppcheck']
let g:syntastic_javascript_checkers = ['eslint']
2016-12-18 06:40:28 +00:00
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
2017-01-12 21:09:52 +00:00
let g:syntastic_php_checkers = ['php', 'phpcs']
2016-12-18 06:40:28 +00:00
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
2017-01-21 05:09:43 +00:00
let g:syntastic_rust_checkers = ['rustc']
2016-10-29 05:09:40 +00:00
2017-01-21 05:09:43 +00:00
" deoplete
let g:deoplete#enable_at_startup = 1
let g:tern_request_timeout = 1
let g:tern_show_signature_in_pum = '0'
set completeopt+=noinsert
set completeopt+=noselect
set completeopt-=preview
" deoplete tab-complete
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
let g:deoplete#omni#functions = {}
let g:deoplete#omni#functions.javascript = [
\ 'tern#Complete'
\]
2017-04-04 03:17:19 +00:00
" python host paths
let g:python_host_prog = '/usr/bin/python2'
let g:python3_host_prog = '/usr/bin/python3'