-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvimrc
104 lines (77 loc) · 2.67 KB
/
nvimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
set relativenumber " show relative line numbers
set number " show the current line number
set smartindent
set showcmd " show mode
set cursorline " highlight the current line
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set splitbelow " splitting a window will put it below
set splitright " splitting a window will put it right
set foldlevel=999 " start with all folds expanded
set ruler " show row/column
set scrolloff=1 " always show one line below/above your cursor
set mouse=a " mouse support
" set termguicolors
set undofile
set inccommand=nosplit " live preview for replace
" vim-plug
call plug#begin('~/.config/nvim/plugs')
Plug 'flazz/vim-colorschemes' " colorschemes
Plug 'scrooloose/nerdtree' " sidebar tree
Plug 'Xuyuanp/nerdtree-git-plugin' " sidebar tree git support
Plug 'neomake/neomake' " code checkers for many languages
Plug 'vim-airline/vim-airline' " pretty status bar
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'airblade/vim-gitgutter'
" language support
Plug 'yanqd0/nginx.vim' " nginx conf
Plug 'wlangstroth/vim-racket' " racket
Plug 'arrufat/vala.vim' " vala
Plug 'igankevich/mesonic' " meson
Plug 'leafgarland/typescript-vim' " typescript
Plug 'cespare/vim-toml' " toml
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" autocompletion
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Plug 'zchee/deoplete-clang'
" Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' }
" Plug 'poppyschmo/deoplete-latex'
" Plug 'Shougo/neco-vim'
call plug#end()
colorscheme Tomorrow-Night-Eighties
highlight Comment cterm=italic
nmap <Leader>; :Buffers<CR>
nmap <Leader>t :Files<CR>
" open nerdtree on start and put cursor back in other window
autocmd VimEnter * NERDTree | wincmd p
" close nerdtree if it's the only window left
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
\ quit | endif
" run neomake on write
autocmd! BufWritePost * Neomake
" use unicode symbols for airline
let g:airline_powerline_fonts = 1
" enable deoplete autocompletion
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#clang#libclang_path = '/usr/lib64/libclang.so'
let g:deoplete#sources#clang#clang_header = '/usr/include/clang'
let g:gitgutter_realtime = 0
inoremap <Up> <Nop>
inoremap <Down> <Nop>
inoremap <Left> <Nop>
inoremap <Right> <Nop>
inoremap jk <esc>
augroup scala_sc
au!
autocmd BufNewFile,BufRead *.sc set syntax=scala
augroup END
let g:neovide_cursor_vfx_mode = "railgun"
let g:neovide_input_use_logo = 1
let g:neovide_remember_window_size = v:true
map <D-v> "+p<CR>
map! <D-v> <C-R>+
tmap <D-v> <C-R>+
vmap <D-c> "+y<CR>