You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.9 KiB
102 lines
2.9 KiB
let mapleader = ','
|
|
|
|
nnoremap <C-p> :<C-u>FZF<CR>
|
|
command! PackUpdate call minpac#update()
|
|
command! PackClean call minpac#clean()
|
|
|
|
set number
|
|
set expandtab
|
|
set shiftwidth=2
|
|
set softtabstop=2
|
|
|
|
filetype plugin indent on
|
|
|
|
packadd minpac
|
|
call minpac#init()
|
|
call minpac#add('k-takata/minpac', {'type':'opt'})
|
|
call minpac#add('junegunn/fzf')
|
|
call minpac#add('junegunn/fzf.vim')
|
|
call minpac#add('vim-airline/vim-airline')
|
|
call minpac#add('vim-airline/vim-airline-themes')
|
|
call minpac#add('tpope/vim-fugitive')
|
|
call minpac#add('prabirshrestha/async.vim')
|
|
call minpac#add('prabirshrestha/asyncomplete.vim')
|
|
"asyncomplete settings
|
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
|
|
imap <c-space> <Plug>(asyncomplete_force_refresh)
|
|
|
|
call minpac#add('prabirshrestha/asyncomplete-lsp.vim')
|
|
call minpac#add('prabirshrestha/vim-lsp')
|
|
"vim-lsp language server settings
|
|
if executable('rls')
|
|
au User lsp_setup call lsp#register_server({
|
|
\ 'name': 'rls',
|
|
\ 'cmd': {server_info->['rustup', 'run', 'stable', 'rls']},
|
|
\ 'workspace_config': {'rust': {'clippy_preference': 'on'}},
|
|
\ 'whitelist': ['rust'],
|
|
\ })
|
|
endif
|
|
call minpac#add('vim-syntastic/syntastic')
|
|
"syntastic settings
|
|
let g:airline#extensions#syntastic#enabled = 1
|
|
let airline#extensions#syntastic#error_symbol = 'E:'
|
|
let airline#extensions#syntastic#stl_format_err = '%E{[%e(#%fe)]}'
|
|
let airline#extensions#syntastic#warning_symbol = 'W:'
|
|
let airline#extensions#syntastic#stl_format_warn = '%W{[%w(#%fw)]}'
|
|
|
|
call minpac#add('majutsushi/tagbar')
|
|
"tagbar settings
|
|
let g:rust_use_custom_ctags_defs = 1 " if using rust.vim
|
|
let g:tagbar_type_rust = {
|
|
\ 'ctagsbin' : '/path/to/your/universal/ctags',
|
|
\ 'ctagstype' : 'rust',
|
|
\ 'kinds' : [
|
|
\ 'n:modules',
|
|
\ 's:structures:1',
|
|
\ 'i:interfaces',
|
|
\ 'c:implementations',
|
|
\ 'f:functions:1',
|
|
\ 'g:enumerations:1',
|
|
\ 't:type aliases:1:0',
|
|
\ 'v:constants:1:0',
|
|
\ 'M:macros:1',
|
|
\ 'm:fields:1:0',
|
|
\ 'e:enum variants:1:0',
|
|
\ 'P:methods:1',
|
|
\ ],
|
|
\ 'sro': '::',
|
|
\ 'kind2scope' : {
|
|
\ 'n': 'module',
|
|
\ 's': 'struct',
|
|
\ 'i': 'interface',
|
|
\ 'c': 'implementation',
|
|
\ 'f': 'function',
|
|
\ 'g': 'enum',
|
|
\ 't': 'typedef',
|
|
\ 'v': 'variable',
|
|
\ 'M': 'macro',
|
|
\ 'm': 'field',
|
|
\ 'e': 'enumerator',
|
|
\ 'P': 'method',
|
|
\ },
|
|
\ }
|
|
let g:airline#extensions#tagbar#enabled = 1
|
|
let g:airline#extensions#tagbar#flags = ''
|
|
let g:airline#extensions#tagbar#flags = 'f'
|
|
let g:airline#extensions#tagbar#flags = 's'
|
|
let g:airline#extensions#tagbar#flags = 'p'
|
|
call minpac#add('rust-lang/rust.vim')
|
|
|
|
call minpac#add('morhetz/gruvbox')
|
|
"gruvbox settings
|
|
let g:gruvbox_italic = 1
|
|
let g:gruvbox_contrast_dark = 'hard'
|
|
let g:gruvbox_contrast_light = 'hard'
|
|
colorscheme gruvbox
|
|
set background=dark
|
|
|
|
if &t_Co > 1
|
|
syntax enable
|
|
endif
|
|
|