blob: 088c169f107200aba7d2fd6275b86eeb482cc843 (
plain) (
blame)
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
|
" netrw
let g:netrw_banner = 0
let g:netrw_keepdir = 0
let g:netrw_liststyle = 3
let g:netrw_sort_options = 'i'
" autostart netrw if vim starts without arguments
"autocmd VimEnter * if !argc() | Explore | endif
" plugin manager
call plug#begin('~/.vim/plugged')
Plug 'w0rp/ale'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'mileszs/ack.vim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'bling/vim-airline'
Plug 'tpope/vim-fireplace'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'xolox/vim-misc'
Plug 'vim-scripts/paredit.vim'
Plug 'ryanoasis/vim-devicons'
Plug 'ms-jpq/chadtree', {'branch': 'chad', 'do': 'python3 -m chadtree deps'}
Plug 'https://git.sr.ht/~sircmpwn/hare.vim'
"Plug 'tpope/vim-fugitive.git'
"Plug 'severin-lemaignan/vim-minimap'
call plug#end()
" enable spell check
"autocmd FileType rst set spell
"if exists('g:GuiLoaded')
"GuiTabline 0
"endif
"autocmd UIEnter * GuiTabline 0
" airline configuration
set laststatus=2
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#ale#enabled = 1
" remap Esc
"imap <S-Space> <Esc>
"nmap <S-Space> <Esc>
" function keys map
noremap <F5> :NERDTreeToggle<CR>
noremap <F6> :TagbarToggle<CR>
noremap <F7> :MBEToggle<CR>
noremap <F8> :tabp<CR>
noremap <F9> :tabn<CR>
" center cursor vertically
nnoremap <Leader>zz :let &scrolloff=999-&scrolloff<CR>
" ale configuration
let g:ale_linters = {
\ 'python': ['flake8'],
\ 'c': ['clangd']
\ }
let g:ale_linters_explicit = 1
let g:ale_completion_enabled = 1
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_c_clangd_options = '--header-insertion=never'
" YouCompleteMe configuration
"let g:ycm_auto_trigger = 0
"let g:ycm_show_diagnostics_ui = 0
" completion options
set completeopt=menuone,preview,noinsert
set omnifunc=ale#completion#OmniFunc
" use ack.vim with ag
let g:ackprg = 'ag --vimgrep'
" disable conceal
" ctrlP
"let g:ctrlp_prompt_mappings = {
"\ 'ToggleType(1)': ['<c-p>', '<c-f>', '<c-up>'],
"\ }
|