2018-07-21 17:30:18 +02:00
set nocompatible " be iMproved, required
2018-12-05 08:21:18 +01:00
filetype on " required
2018-07-21 17:30:18 +02:00
" set the runtime path to include Vundle and initialize
set rtp + = ~ /.vim/ bundle /Vundle .vim
call vundle #begin ( )
" alternatively, pass a path where Vundle should install bundles
"let path = '~/some/path/here'
"call vundle#rc(path)
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
2019-08-03 07:46:42 +02:00
"Plugin 'zah/nim.vim'
2018-07-21 17:30:18 +02:00
Plugin 'scrooloose/syntastic'
2019-12-10 18:50:44 +01:00
Plugin 'w0ng/vim-hybrid'
2018-12-05 08:21:18 +01:00
Plugin 'rust-lang/rust.vim'
2019-12-10 18:50:44 +01:00
Plugin 'fatih/vim-go'
2018-12-26 15:39:12 +01:00
Plugin 'udalov/kotlin-vim'
2019-08-03 07:46:42 +02:00
"Plugin 'Valloric/YouCompleteMe'
2020-06-02 11:04:40 +02:00
Plugin 'phanviet/vim-monokai-pro'
2019-08-03 07:46:42 +02:00
"Plugin 'wincent/command-t'
Plugin 'cespare/vim-toml'
Plugin 'sirver/UltiSnips'
Plugin 'honza/vim-snippets'
Plugin 'junegunn/fzf'
2020-06-02 11:04:40 +02:00
"Plugin 'ervandew/supertab'
2019-08-03 07:46:42 +02:00
" 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-ultisnips'
2020-06-02 11:04:40 +02:00
Plugin 'ncm2/ncm2-racer'
Plugin 'zxqfl/tabnine-vim'
2019-04-08 16:03:09 +02:00
2018-07-21 17:30:18 +02:00
2019-12-10 18:50:44 +01:00
let g :go_def_mode = 'gopls'
let g :go_info_mode = 'gopls'
2018-07-21 17:30:18 +02:00
call vundle #end ( ) " required
2018-12-26 15:39:12 +01:00
"set rtp+=~/code/tabnine-vim
filetype plugin on
2019-02-12 19:32:49 +01:00
autocmd BufNewFile , BufRead *.vpy setfiletype python
2019-12-10 18:50:44 +01:00
autocmd BufNewFile , BufRead *.kt set ft = kotlin
2018-07-21 17:30:18 +02:00
2019-08-03 07:46:42 +02:00
" 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
2020-06-02 11:04:40 +02:00
"\ 'rust': ['rustup', 'run', 'stable', 'rls'],
"\ 'rust': ['rust-analyzer'],
2019-08-03 07:46:42 +02:00
let g :LanguageClient_serverCommands = {
\ 'rust' : ['rustup' , 'run' , 'nightly' , 'rls' ],
2019-12-10 18:50:44 +01:00
\ 'haskell' : ['hie-wrapper' ],
\ 'python' : ['/usr/bin/pyls' ],
\ 'go' : ['gopls' ],
\ 'kotlin' : ['/usr/bin/kotlin-language-server' ],
\ 'c' : ['/usr/bin/ccls' ],
2019-08-03 07:46:42 +02:00
\ }
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 >
2019-12-10 18:50:44 +01:00
nnoremap < silent > < F6 > :call LanguageClient #textDocument_rename ( ) < CR >
2018-07-21 17:30:18 +02:00
2018-02-07 13:19:36 +01:00
set number
set showmatch
set hlsearch
set ignorecase
set smartcase
set incsearch
set autoindent
set cindent
set expandtab
set shiftwidth = 4
set smartindent
set smarttab
set softtabstop = 4
2018-12-05 08:21:18 +01:00
set relativenumber
2018-02-07 13:19:36 +01:00
" set beam cursor in insert mode
let &t_SI = "\<esc>[5 q"
let &t_SR = "\<esc>[5 q"
let &t_EI = "\<esc>[2 q"
set undolevels = 1000
set backspace = indent , eol , start
2018-07-21 17:30:18 +02:00
let g :hybrid_custom_term_colors = 1
let g :hybrid_reduced_contrast = 1
set background = dark
2019-04-08 16:03:09 +02:00
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
2019-08-03 07:46:42 +02:00
let g :autofmt_autosave = 1
2019-04-08 16:03:09 +02:00
set termguicolors
2020-06-02 11:04:40 +02:00
colorscheme monokai_pro
2018-02-07 13:19:36 +01:00
syntax on
2019-12-10 18:50:44 +01:00
let g :netrw_liststyle = 3
let g :netrw_banner = 0
let g :netrw_browse_split = 4
2020-06-02 11:04:40 +02:00
let g :netrw_winsize = 15
2019-12-10 18:50:44 +01:00
nmap < F2 > :Vexplore < Return >
2020-06-02 11:04:40 +02:00
nmap < C - A - L > :RustFmt < Return >
2019-12-10 18:50:44 +01:00
2018-02-07 13:19:36 +01:00
set statusline + = %#warningmsg #
set statusline + = %{SyntasticStatuslineFlag ( ) }
set statusline + = %*
2019-12-10 18:50:44 +01:00
let g :syntastic_always_populate_loc_list = 0
2018-02-07 13:19:36 +01:00
let g :syntastic_auto_loc_list = 1
2019-04-08 16:03:09 +02:00
let g :syntastic_check_on_open = 0
2018-02-07 13:19:36 +01:00
let g :syntastic_check_on_wq = 0
2019-04-08 16:03:09 +02:00
let g :syntastic_check_on_write = 0
let g :syntastic_mode_map = { 'mode' : 'passive' }
2019-12-10 18:50:44 +01:00
nmap < F3 > :SyntasticCheck < CR >
nnoremap < C - J > < C - W > j
nnoremap < C - K > < C - W > k
"nnoremap <C-L> <C-W>l
nnoremap < C - H > < C - W > h
set splitbelow
set splitright