vimrc changes

This commit is contained in:
kageru 2019-08-03 07:46:42 +02:00
parent ad10da983c
commit 4317feec05
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 166 additions and 6 deletions

46
.vimrc
View File

@ -10,15 +10,29 @@ call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'zah/nim.vim'
"Plugin 'zah/nim.vim'
Plugin 'scrooloose/syntastic'
Plugin 'w0ng/vim-hybrid'
"Plugin 'w0ng/vim-hybrid'
Plugin 'rust-lang/rust.vim'
Plugin 'fatih/vim-go'
"Plugin 'fatih/vim-go'
Plugin 'udalov/kotlin-vim'
Plugin 'Valloric/YouCompleteMe'
"Plugin 'Valloric/YouCompleteMe'
Plugin 'phanviet/vim-monokai-pro'
Plugin 'wincent/command-t'
"Plugin 'wincent/command-t'
Plugin 'cespare/vim-toml'
Plugin 'sirver/UltiSnips'
Plugin 'honza/vim-snippets'
Plugin 'junegunn/fzf'
Plugin 'ervandew/supertab'
" rp call thing for auto completion with language servers
Plugin 'roxma/nvim-yarp'
" language client stuff
Plugin 'autozimu/LanguageClient-neovim'
Plugin 'ncm2/ncm2'
Plugin 'ncm2/ncm2-jedi'
Plugin 'ncm2/ncm2-racer'
Plugin 'ncm2/ncm2-ultisnips'
"Plugin 'zxqfl/tabnine-vim'
@ -27,6 +41,26 @@ call vundle#end() " required
filetype plugin on
autocmd BufNewFile,BufRead *.vpy setfiletype python
" for ncm2 completion
autocmd BufEnter * call ncm2#enable_for_buffer()
set completeopt=noinsert,menuone,noselect
"inoremap <expr> <Tab> (pumvisible() ? "\<CR>" : "\<Tab>")
"inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")
"inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Required for operations modifying multiple buffers like rename.
set hidden
let g:LanguageClient_serverCommands = {
\ 'rust': ['rustup', 'run', 'nightly', 'rls'],
\ }
" \ 'python': ['/usr/local/bin/pyls'],
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
" Or map each action separately
nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
set number
set showmatch
@ -60,6 +94,7 @@ let g:hybrid_reduced_contrast = 1
set background=dark
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
let g:autofmt_autosave = 1
set termguicolors
colorscheme monokai_pro
syntax on
@ -75,4 +110,3 @@ let g:syntastic_check_on_wq = 0
let g:syntastic_check_on_write = 0
let g:syntastic_mode_map = { 'mode': 'passive' }
nmap <F2> :SyntasticCheck<CR>

126
bin/base16-monokai.sh Executable file
View File

@ -0,0 +1,126 @@
#!/bin/sh
# base16-shell (https://github.com/chriskempson/base16-shell)
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
# Monokai scheme by Wimer Hazenberg (http://www.monokai.nl)
color00="2d/2a/2e" # Base 00 - Black
color01="ff/61/88" # Base 08 - Red
color02="a9/dc/76" # Base 0B - Green
color03="ff/d8/66" # Base 0A - Yellow
color04="ab/9d/f2" # Base 0D - Blue
color05="fc/98/67" # Base 0E - Magenta
color06="78/dc/e8" # Base 0C - Cyan
color07="fc/fc/fa" # Base 05 - White
color08="a9/a8/a8" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="ff/ff/ff" # Base 07 - Bright White
color16="19/18/1a" # Base 09
color17="22/1f/22" # Base 0F
color18="56/54/57" # Base 01
color19="80/7e/80" # Base 02
color20="d3/d2/d1" # Base 04
color21="fe/fe/fd" # Base 06
color_foreground="fc/fc/fa" # Base 05
color_background="2d/2a/2e" # Base 00
if [ -n "$TMUX" ]; then
# Tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
put_template() { printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' $@; }
put_template_var() { printf '\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' $@; }
put_template_custom() { printf '\033Ptmux;\033\033]%s%s\033\033\\\033\\' $@; }
elif [ "${TERM%%[-.]*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
put_template() { printf '\033P\033]4;%d;rgb:%s\007\033\\' $@; }
put_template_var() { printf '\033P\033]%d;rgb:%s\007\033\\' $@; }
put_template_custom() { printf '\033P\033]%s%s\007\033\\' $@; }
elif [ "${TERM%%-*}" = "linux" ]; then
put_template() { [ $1 -lt 16 ] && printf "\e]P%x%s" $1 $(echo $2 | sed 's/\///g'); }
put_template_var() { true; }
put_template_custom() { true; }
else
put_template() { printf '\033]4;%d;rgb:%s\033\\' $@; }
put_template_var() { printf '\033]%d;rgb:%s\033\\' $@; }
put_template_custom() { printf '\033]%s%s\033\\' $@; }
fi
# 16 color space
put_template 0 $color00
put_template 1 $color01
put_template 2 $color02
put_template 3 $color03
put_template 4 $color04
put_template 5 $color05
put_template 6 $color06
put_template 7 $color07
put_template 8 $color08
put_template 9 $color09
put_template 10 $color10
put_template 11 $color11
put_template 12 $color12
put_template 13 $color13
put_template 14 $color14
put_template 15 $color15
# 256 color space
put_template 16 $color16
put_template 17 $color17
put_template 18 $color18
put_template 19 $color19
put_template 20 $color20
put_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
put_template_custom Pg f8f8f2 # foreground
put_template_custom Ph 272822 # background
put_template_custom Pi f8f8f2 # bold color
put_template_custom Pj 49483e # selection color
put_template_custom Pk f8f8f2 # selected text color
put_template_custom Pl f8f8f2 # cursor
put_template_custom Pm 272822 # cursor text
else
put_template_var 10 $color_foreground
if [ "$BASE16_SHELL_SET_BACKGROUND" != false ]; then
put_template_var 11 $color_background
if [ "${TERM%%-*}" = "rxvt" ]; then
put_template_var 708 $color_background # internal border (rxvt)
fi
fi
put_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset -f put_template
unset -f put_template_var
unset -f put_template_custom
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background