-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
89 lines (76 loc) · 2.3 KB
/
vimrc
File metadata and controls
89 lines (76 loc) · 2.3 KB
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
set title
" set smartindent
set autoindent
syntax enable
nnoremap <silent><C-t> :tabe<CR>
nnoremap <silent><C-w> :tabn<CR>
nnoremap <silent><Tab> :wincmd w<CR>
nnoremap <silent><C-e> :NERDTreeToggle<CR>
" plugin section
call plug#begin('$HOME/.config/nvim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'scrooloose/nerdtree'
Plug 'Shougo/ddc.vim'
Plug 'vim-denops/denops.vim'
Plug 'Shougo/ddc-ui-native'
" Install your sources
Plug 'Shougo/ddc-around'
" Install your filters
Plug 'Shougo/ddc-matcher_head'
Plug 'Shougo/ddc-sorter_rank'
Plug 'mattn/vim-lsp-settings'
Plug 'prabirshrestha/vim-lsp'
Plug 'airblade/vim-gitgutter'
Plug 'ojroques/vim-oscyank', {'branch': 'main'}
call plug#end()
set visualbell t_vb=
set mouse=a
set clipboard&
set clipboard^=unnamedplus
set backspace=indent,eol,start
" Customize global settings
" Use around source.
" https://github.com/Shougo/ddc-around
call ddc#custom#patch_global('ui', 'native')
call ddc#custom#patch_global('sources', ['around'])
" Use matcher_head and sorter_rank.
" https://github.com/Shougo/ddc-matcher_head
" https://github.com/Shougo/ddc-sorter_rank
call ddc#custom#patch_global('sourceOptions', #{
\ _: #{
\ matchers: ['matcher_head'],
\ sorters: ['sorter_rank']},
\ })
" Change source options
call ddc#custom#patch_global('sourceOptions', #{
\ around: #{mark: 'A'},
\ })
call ddc#custom#patch_global('sourceParams', #{
\ around: #{maxSize: 500},
\ })
" Customize settings on a filetype
call ddc#custom#patch_filetype(['c', 'cpp'], 'sources', ['around', 'clangd'])
call ddc#custom#patch_filetype(['c', 'cpp'], 'sourceOptions', #{
\ clangd: #{mark: 'C'},
\ })
call ddc#custom#patch_filetype('markdown', 'sourceParams', #{
\ around: #{maxSize: 100},
\ })
" Mappings
"
" <TAB>: completion.
inoremap <silent><expr> <TAB>
\ pumvisible() ? '<C-n>' :
\ (col('.') <= 1 <Bar><Bar> getline('.')[col('.') - 2] =~# '\s') ?
\ '<TAB>' : ddc#map#manual_complete()
" <S-TAB>: completion back.
inoremap <expr><S-TAB> pumvisible() ? '<C-p>' : '<C-h>'
" Use ddc.
call ddc#enable()
set number
set updatetime=100
packadd termdebug
set list
set listchars=tab:>-,trail:-,eol:↲,extends:»,precedes:«,nbsp:%
hi NonText ctermbg=None ctermfg=59 guibg=NONE guifg=None
hi SpecialKey ctermbg=None ctermfg=59 guibg=NONE guifg=None