-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
146 lines (133 loc) · 5.87 KB
/
.vimrc
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
" plugins
call plug#begin('~/.vim/plugged')
Plug 'vim-python/python-syntax'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-dadbod'
Plug 'airblade/vim-gitgutter'
Plug 'yegappan/lsp'
let lspServers = [#{
\ name: 'pyright',
\ filetype: 'python',
\ path: 'pyright-langserver',
\ args: ['--stdio'],
\ workspaceConfig: #{
\ python: #{
\ analysis: #{
\ typeCheckingMode: 'off',
\ diagnosticsMode: 'openFilesOnly',
\ diagnosticSeverityOverrides: #{
\ strictParameterNoneValue: 'false',
\ reportMissingImports: 'error',
\ reportUndefinedVariable: 'error',
\ reportAssertAlwaysTrue: 'information',
\ reportWildcardImportFromLibrary: 'warning',
\ reportGeneralTypeIssues: 'none',
\ reportOptionalSubscript: 'none',
\ reportOptionalMemberAccess: 'none',
\ reportOptionalCall: 'none',
\ reportOptionalIterable: 'none',
\ reportOptionalContextManager: 'none',
\ reportOptionalOperand: 'none',
\ reportTypedDictNotRequiredAccess: 'information',
\ reportPrivateImportUsage: 'error',
\ reportUnboundVariable: 'error',
\ reportUnusedCoroutine: 'information',
\ reportConstantRedefinition: 'warning',
\ reportDeprecated: 'information',
\ reportDuplicateImport: 'warning',
\ reportPrivateUsage: 'error',
\ reportUnnecessaryCast: 'information',
\ reportUnnecessaryComparison: 'information',
\ reportUnnecessaryContains: 'information',
\ reportUnnecessaryIsInstance: 'information',
\ reportUnusedImport: 'information',
\ reportUnusedVariable: 'information',
\ }
\ }
\ }}
\ }]
autocmd VimEnter * call LspAddServer(lspServers)
nnoremap <buffer> gd <Cmd>LspGotoDefinition<CR>
nnoremap <buffer> [d <Cmd>LspDiagPrev<CR>
nnoremap <buffer> ]d <Cmd>LspDiagNext<CR>
Plug 'itchyny/lightline.vim'
let g:lightline = {
\ 'colorscheme': 'gruvbox',
\ 'active': {
\ 'left': [ [ 'mode', 'paste'],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\},
\ 'component_function': {
\ 'gitbranch': 'FugitiveHead'
\ },
\}
Plug 'psf/black', {'branch': 'stable'}
let g:black_linelength = 79
let g:black_skip_string_normalization = 1
augroup black_on_save
autocmd!
autocmd BufWritePre *.py Black
augroup end
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
:nmap <space>f :Files<CR>
:nmap <space>b :Buffers<CR>
:nmap <space>r :Rg<CR>
let g:fzf_layout = {'window': {'width': 0.9, 'height': 0.6, 'relative': v:true, 'yoffset': 1.0 }}
let g:fzf_colors =
\ {'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
Plug 'morhetz/gruvbox'
let g:gruvbox_contrast_dark = 'hard'
let g:gruvbox_italicize_comments=1
let g:gruvbox_italicize_strings=1
call plug#end()
filetype plugin indent on
let python_highlight_all=1
syntax on
autocmd Filetype help wincmd L
autocmd Filetype man wincmd L
set noswapfile
set splitright
set scrolloff=20
set incsearch
set laststatus=2
set cursorline
set relativenumber
set nu
set t_Co=256
set noshowmode
set fileformat=unix
set encoding=utf-8
set fileencoding=utf-8
set foldmethod=indent
set foldlevel=99
set tabstop=4
set shiftwidth=4
set softtabstop=4
set colorcolumn=80
set expandtab
set viminfo='25,\"50,n~/.viminfo
set wildmenu
set wildmode=list:longest
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
autocmd FileType html setlocal tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType css setlocal tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 softtabstop=2
set bg=dark
colorscheme gruvbox
highlight Comment cterm=italic