diff --git a/init.vim b/init.vim index f6e4781..5a5900a 100644 --- a/init.vim +++ b/init.vim @@ -19,82 +19,18 @@ set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* 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 -" LanguageClient-neoviM -let g:LanguageClient_serverCommands = { - \ 'scala': ['metals-vim'], - \ 'sbt': ['metals-vim'], - \ 'python': ['pyls'], - \ 'c': ['ccls'], - \ 'go': ['go-langserver'], - \ 'bash': ['bash-language-server'] - \ } +" Disable auto-opening of location list +let g:syntastic_auto_loc_list = 0 -let g:LanguageClient_useVirtualText = 0 +" Check on file open +let g:syntastic_check_on_open = 0 -function! LC_maps() - if has_key(g:LanguageClient_serverCommands, &filetype) - nnoremap d - \ :call LanguageClient#textDocument_definition() - nnoremap t - \ :call LanguageClient#textDocument_typeDefinition() - nnoremap s - \ :call LanguageClient#textDocument_documentSymbol() - nnoremap u - \ :call LanguageClient#textDocument_references() - nnoremap r - \ :call LanguageClient#textDocument_rename() - nnoremap i - \ :call LanguageClient#textDocument_implementation() - nnoremap f - \ :call LanguageClient#textDocument_formatting() - nnoremap h - \ :call LanguageClient#textDocument_documentHighlight() - nnoremap H - \ :call LanguageClient#textDocument_clearDocumentHighlight() - endif -endfunction +" Force python3 when using systastic +let g:syntastic_python_checkers=['pylint'] -autocmd FileType * call LC_maps() - -" NCM2 - -" enable ncm2 for all buffers -autocmd BufEnter * call ncm2#enable_for_buffer() - -" IMPORTANT: :help Ncm2PopupOpen for more information -set completeopt=noinsert,menuone,noselect - -" suppress the annoying 'match x of y', 'The only match' and 'Pattern not -" found' messages -set shortmess+=c - -" CTRL-C doesn't trigger the InsertLeave autocmd . map to instead. -inoremap - -" Use to select the popup menu: -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" - -" wrap existing omnifunc -" Note that omnifunc does not run in background and may probably block the -" editor. If you don't want to be blocked by omnifunc too often, you could -" add 180ms delay before the omni wrapper: -" 'on_complete': ['ncm2#on_complete#delay', 180, -" \ 'ncm2#on_complete#omni', 'csscomplete#CompleteCSS'], -au User Ncm2Plugin call ncm2#register_source({ - \ 'name' : 'css', - \ 'priority': 9, - \ 'subscope_enable': 1, - \ 'scope': ['css','scss'], - \ 'mark': 'css', - \ 'word_pattern': '[\w\-]+', - \ 'complete_pattern': ':\s*', - \ 'on_complete': ['ncm2#on_complete#omni', 'csscomplete#CompleteCSS'], - \ }) +nnoremap c :SyntasticCheck " FILE MANAGER @@ -106,6 +42,20 @@ command! -nargs=? -complete=dir Vexplore leftabove vsplit | silent Dirvish c GA +nnoremap a GA " COLORSCHEME diff --git a/plugins.vim b/plugins.vim index 00207d0..7fd4d90 100644 --- a/plugins.vim +++ b/plugins.vim @@ -29,17 +29,29 @@ Plug 'wlangstroth/vim-racket', { 'for': 'scheme' } Plug 'leafgarland/typescript-vim', { 'for': 'typescript' } Plug 'mboughaba/i3config.vim', { 'for': 'i3config' } -" LanguageClient support -Plug 'Shougo/vimproc.vim', { 'do': 'make' } -Plug 'roxma/nvim-yarp' -Plug 'ncm2/ncm2' -Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } -Plug 'junegunn/fzf.vim', { 'do': 'yes \| ./install' } - -" Syntax checking for C +" Syntax checking Plug 'vim-syntastic/syntastic' +" Dustjs highlight +Plug 'jimmyhchan/dustjs.vim' + +" Completion engine +if has('nvim') + Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } +else + Plug 'Shougo/deoplete.nvim' + Plug 'roxma/nvim-yarp' + Plug 'roxma/vim-hug-neovim-rpc' +endif + +" Competion language support +Plug 'SirVer/ultisnips' +Plug 'honza/vim-snippets' + +Plug 'carlitux/deoplete-ternjs', { 'for': ['javascript', 'javascript.jsx'] } +Plug 'othree/jspc.vim', { 'for': ['javascript', 'javascript.jsx'] } + +Plug 'deoplete-plugins/deoplete-jedi' " Python (pip install jedi) + + call plug#end() diff --git a/view/=+private=+etc=+shells= b/view/=+private=+etc=+shells= new file mode 100644 index 0000000..90fa482 --- /dev/null +++ b/view/=+private=+etc=+shells= @@ -0,0 +1,115 @@ +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +argglobal +setlocal autoindent +setlocal backupcopy= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal nocindent +setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn=+1 +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal complete=.,w,b,u,t,i +setlocal completefunc= +setlocal nocopyindent +setlocal cryptmethod=blowfish2 +setlocal nocursorbind +setlocal nocursorcolumn +setlocal nocursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal noexpandtab +if &filetype != 'conf' +setlocal filetype=conf +endif +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=0 +setlocal foldmarker={{{,}}} +setlocal foldmethod=manual +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=croql +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=0 +setlocal imsearch=-1 +setlocal include= +setlocal includeexpr= +setlocal indentexpr= +setlocal indentkeys=0{,0},:,0#,!^F,o,O,e +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg= +setlocal nolinebreak +setlocal nolisp +setlocal lispwords= +setlocal nolist +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal nomodeline +setlocal modifiable +setlocal nrformats=bin,octal,hex +setlocal number +setlocal numberwidth=4 +setlocal omnifunc= +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal relativenumber +setlocal noscrollbind +setlocal shiftwidth=8 +setlocal noshortname +setlocal signcolumn=auto +setlocal nosmartindent +setlocal softtabstop=0 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline=%!airline#statusline(1) +setlocal suffixesadd= +setlocal swapfile +setlocal synmaxcol=3000 +if &syntax != 'conf' +setlocal syntax=conf +endif +setlocal tabstop=8 +setlocal tagcase= +setlocal tags= +setlocal textwidth=0 +setlocal thesaurus= +setlocal undofile +setlocal undolevels=-123456 +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +silent! normal! zE +let s:l = 12 - ((11 * winheight(0) + 11) / 23) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +12 +normal! 019| +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +" vim: set ft=vim :