forked from posquit0/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugins.programming.vim
More file actions
231 lines (199 loc) · 6.65 KB
/
Copy pathplugins.programming.vim
File metadata and controls
231 lines (199 loc) · 6.65 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
" plugins.programming.vim
"
" Maintained by Claud D. Park <posquit0.bj@gmail.com>
" http://www.posquit0.com/
"" A collection of language packs for Vim
"" Plugin: Vim Polyglot {{{
" No conceal in JSON
let g:vim_json_syntax_conceal=0
" Enable syntax highlighting for JSDocs
let g:javascript_plugin_jsdoc=1
" Markdown
let g:vim_markdown_conceal=0
"" }}}
"" Asynchronous Lint Engine
"" Plugin: ALE {{{
" Enable ALE
let g:ale_enable=1
" Set the language specific linters
let g:ale_linters={
\ 'javascript': ['eslint'],
\ 'python': ['flake8'],
\ 'lua': ['luac', 'luacheck'],
\ 'terraform': ['tflint'],
\ }
" Set aliases from one filetype to another
let g:ale_linter_aliases={
\ 'javascript': ['javascript', 'javascript.jsx', 'jsx'],
\ }
" No lint everytime for my battery
let g:ale_lint_on_text_changed='normal'
" Run after the delay
let g:ale_lint_delay=400
" Run on opening a file
let g:ale_lint_on_enter=1
" Run on saving a file
let g:ale_lint_on_save=1
" Run on leaving insert mode
let g:ale_lint_on_insert_leave=1
" Don't open loclist if false
let g:ale_open_list=1
" Set the number of error lines
let g:ale_list_window_size=3
" Customize the output format of statusline
let g:ale_statusline_format=['⨉ %d', '⚠ %d', '⬥ ok']
" Customize the echo message
let g:ale_echo_msg_error_str='E'
let g:ale_echo_msg_warning_str='W'
let g:ale_echo_msg_format='[%severity%:%linter%] %s'
"" }}}
"" Asynchronous build and test dispatcher
"" Plugin: Vim Dispatch {{{
"" }}}
"" Run your tests at the speed of thought
"" Plugin: Vim Test {{{
" Make test commands execute using other strategy
let test#strategy='basic'
" Exit after testing with jest
let test#javascript#jest#options='--passWithNoTests'
nnoremap <silent> <leader>tf :TestFile<CR>
nnoremap <silent> <leader>tn :TestNearest<CR>
nnoremap <silent> <leader>ts :TestSuit<CR>
nnoremap <silent> <leader>tl :TestLast<CR>
nnoremap <silent> <leader>tv :TestVisit<CR>
"" }}}
"" Displays function signatures from completions in the command line
"" Plugin: EchoDoc {{{
"" }}}
"" Dark powered asynchronous completion framework
"" Plugin: Deoplete {{{
" Javascript source for Deoplete
" Add extra filetypes
let g:tern#filetypes=['jsx', 'javascript.jsx', 'vue']
" Use tern_for_vim
let g:tern#command=['tern']
let g:tern#arguments=['--persistent']
" Include documentation strings (if found) in the result data
let g:deoplete#sources#ternjs#docs=1
" Use a case-insensitive compare
let g:deoplete#sources#ternjs#case_insensitive=1
" Sort the result set
let g:deoplete#sources#ternjs#sort=1
" Ignore JavaScript keywords when completing
let g:deoplete#sources#ternjs#include_keywords=0
" Python source for Deoplete
" Enable caching of completions for faster results
let g:deoplete#sources#jedi#enable_cache=1
" Show docstring in preview window
let g:deoplete#sources#jedi#show_docstring=0
if executable('gocode')
" Go source for Deoplete
" By default(not set), Find the gocode binary in $PATH environment
let g:deoplete#sources#go#gocode_binary=$GOPATH.'/bin/gocode'
" By default, the completion word list is in the sort order of gocode
" Available values are [package, func, type, var, const]
let g:deoplete#sources#go#sort_class=['package', 'func', 'type', 'var', 'const']
" Use static json caching Go stdlib package API
let g:deoplete#sources#go#use_cache=1
let g:deoplete#sources#go#json_directory='~/.cache/deoplete/go/$GOOS_$GOARCH'
endif
" Run deoplete automatically
let g:deoplete#enable_at_startup=1
call deoplete#enable()
" Delay the completion after input in milliseconds
call deoplete#custom#option('auto_complete_delay', 200)
" Set the limit of candidates
call deoplete#custom#option('max_list', 64)
" Set the number of the input completion at the time of key input
call deoplete#custom#option('min_pattern_length', 2)
" When a capital letter is included in input, does not ignore
call deoplete#custom#option('smart_case', v:true)
" Close the preview window after completion is done
autocmd CompleteDone * pclose!
" Disable the preview window
set completeopt-=preview
"" }}}
"" Language server for JavaScript and TypeScript
"" Plugin: Language Servers {{{
"" }}}
"" Intellisense engine, full language server protocol support as VSCode
"" Plugin: CoC(Conquer of Completion) {{{
"" }}}
"" Wisely add `end` in ruby, vim, etc
"" Plugin: Endwise {{{
"" }}}
"" For intensely orgasmic commenting
"" Plugin: NERD Commenter {{{
" Comment the whole lines in visual mode
let g:NERDCommentWholeLinesInVMode=1
" Add space after the left delimiter and before the right delimiter
let g:NERDSpaceDelims=1
" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs=1
" Allow commenting and inverting empty lines (useful when commenting a region)
let g:NERDCommentEmptyLines=1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace=1
"" }}}
"" Tools and environment to make Vim superb for developing with Node.js
"" Plugin: Vim Node {{{
"" }}}
"" Syntax file for JavaScript libraries
"" Plugin: Javascript Libraries Syntax {{{
" Set up used libraries
let g:used_javascript_libs='react,jquery,underscore,handlebars'
"" }}}
"""""" HTML & CSS
"" Provide Zen-coding for Vim
"" Plugin: Emmet {{{
" Enable all functions, which is equal to
" n: normal, i: insert: v: visual, a: all
let g:user_emmet_mode='a'
" Remap the default Emmet leader key <C-Y>
let g:user_emmet_leader_key='<C-Y>'
" Customize the behavior of the languages
let g:user_emmet_settings={
\ 'javascript.jsx': {
\ 'extends': 'jsx',
\ },
\ 'javascript': {
\ 'extends': 'jsx',
\ },
\ 'xml': {
\ 'extends': 'html',
\ },
\ 'haml': {
\ 'extends': 'html',
\ },
\ 'jinja': {
\ 'extends': 'html',
\ },
\ 'hbs': {
\ 'extends': 'html',
\ },
\ 'html.handlebars': {
\ 'extends': 'html',
\ },
\ }
"" }}}
"""""" Markdown
"" Hyperfocus-writing in Vim
"" Plugin: Limelight {{{
" Set coefficient value
let g:limelight_default_coefficient=0.7
" Configure the number of preceding/following paragraphs to include
let g:limelight_paragraph_span=1
" Set shortcut to toggle limelight
nnoremap <Leader><Leader>l :Limelight!!<CR>
xnoremap <Leader><Leader>l :Limelight!!<CR>
"" }}}
"" Plugin: Vim Instant Markdown {{{
" Instant markdown Previews from Vim
" Only refresh on specific events
let g:instant_markdown_slow=1
" Manually control to launch the preview window
" Command(:InstantMarkdownPreview)
let g:instant_markdown_autostart=1
" Allow external content like images
let g:instant_markdown_allow_external_content=1
"" }}}