comparison vendor/vim-packs/srcery-vim/after/plugin/srcery.vim @ 704:1e0f578f6752

Update vendor and add support for vim packs
author nanaya <me@nanaya.net>
date Sun, 18 Dec 2022 20:06:46 +0900
parents
children 78469331407e
comparison
equal deleted inserted replaced
703:b7cd7465cc26 704:1e0f578f6752
1 if srcery#helper#ShouldAbort()
2 finish
3 endif
4
5 " Palette {{{
6
7 let s:none = g:srcery#palette.none
8
9 " 16 base colors
10 let s:black = g:srcery#palette.black
11 let s:red = g:srcery#palette.red
12 let s:green = g:srcery#palette.green
13 let s:yellow = g:srcery#palette.yellow
14 let s:blue = g:srcery#palette.blue
15 let s:magenta = g:srcery#palette.magenta
16 let s:cyan = g:srcery#palette.cyan
17 let s:white = g:srcery#palette.white
18 let s:bright_black = g:srcery#palette.bright_black
19 let s:bright_red = g:srcery#palette.bright_red
20 let s:bright_green = g:srcery#palette.bright_green
21 let s:bright_yellow = g:srcery#palette.bright_yellow
22 let s:bright_blue = g:srcery#palette.bright_blue
23 let s:bright_magenta = g:srcery#palette.bright_magenta
24 let s:bright_cyan = g:srcery#palette.bright_cyan
25 let s:bright_white = g:srcery#palette.bright_white
26
27 " xterm colors
28 let s:orange = g:srcery#palette.orange
29 let s:bright_orange = g:srcery#palette.bright_orange
30 let s:hard_black = g:srcery#palette.hard_black
31 let s:xgray1 = g:srcery#palette.xgray1
32 let s:xgray2 = g:srcery#palette.xgray2
33 let s:xgray3 = g:srcery#palette.xgray3
34 let s:xgray4 = g:srcery#palette.xgray4
35 let s:xgray5 = g:srcery#palette.xgray5
36 let s:xgray6 = g:srcery#palette.xgray6
37
38 "}}}
39 " Setup Emphasis: {{{
40
41 let s:bold = g:srcery#palette.bold
42 let s:italic = g:srcery#palette.italic
43 let s:underline = g:srcery#palette.underline
44 let s:undercurl = g:srcery#palette.undercurl
45 let s:inverse = g:srcery#palette.inverse
46
47 " }}}
48 " Sneak: {{{
49
50 if exists('g:loaded_sneak_plugin')
51 hi! link Sneak Search
52 call srcery#helper#Highlight('SneakScope', s:none, s:hard_black)
53 hi! link SneakLabel Search
54 endif
55
56 " }}}
57 " Rainbow Parentheses: {{{
58
59 if !exists('g:rbpt_colorpairs')
60 let g:rbpt_colorpairs =
61 \ [
62 \ ['blue', '#2C78BF'], ['202', '#FF5F00'],
63 \ ['red', '#EF2F27'], ['magenta', '#E02C6D']
64 \ ]
65 endif
66
67 let g:rainbow_guifgs = [ '#E02C6D', '#EF2F27', '#D75F00', '#2C78BF']
68 let g:rainbow_ctermfgs = [ 'magenta', 'red', '202', 'blue' ]
69
70 if !exists('g:rainbow_conf')
71 let g:rainbow_conf = {}
72 endif
73 if !has_key(g:rainbow_conf, 'guifgs')
74 let g:rainbow_conf['guifgs'] = g:rainbow_guifgs
75 endif
76 if !has_key(g:rainbow_conf, 'ctermfgs')
77 let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs
78 endif
79
80 let g:niji_dark_colours = g:rbpt_colorpairs
81 let g:niji_light_colours = g:rbpt_colorpairs
82
83 "}}}
84 " GitGutter: {{{
85
86 if exists('g:loaded_gitgutter')
87 hi! link GitGutterAdd SrceryGreen
88 hi! link GitGutterChange SrceryYellow
89 hi! link GitGutterDelete SrceryRed
90 hi! link GitGutterChangeDelete SrceryYellow
91 endif
92
93 " }}}
94 " Asynchronous Lint Engine: {{{
95
96 if exists('g:ale_enabled')
97 call srcery#helper#Highlight('ALEError', s:none, s:none, s:undercurl, s:red)
98 call srcery#helper#Highlight('ALEWarning', s:none, s:none, s:undercurl, s:yellow)
99 call srcery#helper#Highlight('ALEInfo', s:none, s:none, s:undercurl, s:blue)
100
101 hi! link ALEErrorSign SrceryRed
102 hi! link ALEWarningSign SrceryYellow
103 hi! link ALEInfoSign SrceryBlue
104 endif
105
106 " }}}
107
108 " vim-indent-guides: {{{
109 if exists('g:loaded_indent_guides')
110 call srcery#helper#Highlight('IndentGuidesEven', s:none, s:xgray3)
111 call srcery#helper#Highlight('IndentGuidesOdd', s:none, s:xgray4)
112 endif
113
114 " }}}
115 " vim-startify: {{{
116
117 if exists('g:loaded_startify')
118 hi! link StartifyNumber Statement
119 hi! link StartifyFile Normal
120 hi! link StartifyPath String
121 hi! link StartifySlash Normal
122 hi! link StartifyBracket Comment
123 hi! link StartifyHeader Type
124 hi! link StartifyFooter Normal
125 hi! link StartifySpecial Comment
126 hi! link StartifySection Identifier
127 endif
128
129 " }}}
130 " fzf: {{{
131
132 if exists('g:loaded_fzf')
133 call srcery#helper#Highlight('fzf1', s:magenta, s:xgray2)
134 call srcery#helper#Highlight('fzf2', s:bright_green, s:xgray2)
135 call srcery#helper#Highlight('fzf3', s:bright_white, s:xgray2)
136 endif
137
138 "}}}
139
140 " Netrw: {{{
141
142 hi! link netrwDir SrceryBlue
143 hi! link netrwClassify SrceryCyan
144 hi! link netrwLink SrceryBrightBlack
145 hi! link netrwSymLink SrceryCyan
146 hi! link netrwExe SrceryYellow
147 hi! link netrwComment SrceryBrightBlack
148 hi! link netrwList SrceryBrightBlue
149 hi! link netrwTreeBar SrceryBrightBlack
150 hi! link netrwHelpCmd SrceryCyan
151 hi! link netrwVersion SrceryGreen
152 hi! link netrwCmdSep SrceryBrightBlack
153
154 "}}}
155 " coc.nvim: {{{
156
157 if exists('g:did_coc_loaded')
158 hi! link CocErrorSign SrceryRed
159 hi! link CocWarningSign SrceryBrightOrange
160 hi! link CocInfoSign SrceryYellow
161 hi! link CocHintSign SrceryBlue
162 hi! link CocErrorFloat SrceryRed
163 hi! link CocWarningFloat SrceryOrange
164 hi! link CocInfoFloat SrceryYellow
165 hi! link CocHintFloat SrceryBlue
166 hi! link CocDiagnosticsError SrceryRed
167 hi! link CocDiagnosticsWarning SrceryOrange
168 hi! link CocDiagnosticsInfo SrceryYellow
169 hi! link CocDiagnosticsHint SrceryBlue
170
171 hi! link CocSelectedText SrceryRed
172 hi! link CocCodeLens SrceryWhite
173
174 call srcery#helper#Highlight('CocErrorHighlight', s:none, s:none, s:undercurl, s:red)
175 call srcery#helper#Highlight('CocWarningHighlight', s:none, s:none, s:undercurl, s:bright_orange)
176 call srcery#helper#Highlight('CocInfoHighlight', s:none, s:none, s:undercurl, s:yellow)
177 call srcery#helper#Highlight('CocHintHighlight', s:none, s:none, s:undercurl, s:blue)
178 endif
179
180 " }}}
181 " CtrlP: "{{{
182
183 if exists('g:loaded_ctrlp')
184 hi! link CtrlPMatch SrceryMagenta
185 hi! link CtrlPLinePre SrceryBrightGreen
186 call srcery#helper#Highlight('CtrlPMode1', s:bright_white, s:xgray3)
187 call srcery#helper#Highlight('CtrlPMode2', s:bright_white, s:xgray5)
188 call srcery#helper#Highlight('CtrlPStats', s:yellow, s:xgray2)
189 endif
190
191 " }}}
192 " NERDTree: "{{{
193
194 if exists('g:loaded_nerd_tree')
195 hi! link NERDTreeDir SrceryBlue
196 hi! link NERDTreeDirSlash SrceryCyan
197 hi! link NERDTreeOpenable SrceryBlue
198 hi! link NERDTreeClosable SrceryBlue
199 hi! link NERDTreeFile SrceryWhite
200 hi! link NERDTreeExecFile SrceryYellow
201 hi! link NERDTreeUp SrceryOrange
202 hi! link NERDTreeCWD SrceryGreen
203 hi! link NERDTreeHelp SrceryCyan
204 hi! link NERDTreeFlags SrceryCyan
205 hi! link NERDTreeLinkFile SrceryBrightBlack
206 hi! link NERDTreeLinkTarget SrceryBrightBlack
207 endif
208
209 " }}}
210 " Telescope: "{{{
211
212 if exists('g:loaded_telescope')
213 call srcery#helper#Highlight('TelescopeNormal', s:white, s:none)
214 call srcery#helper#Highlight('TelescopeSelection', s:green, s:none, s:bold)
215 call srcery#helper#Highlight('TelescopeMatching', s:magenta)
216 call srcery#helper#Highlight('TelescopeSelectionCaret', s:magenta)
217 call srcery#helper#Highlight('TelescopePromptPrefix', s:bright_yellow)
218 endif
219
220 " }}}
221 " nvim: {{{
222
223 if has('nvim')
224
225 " nvim-treesitter: {{{
226
227 if exists('g:loaded_nvim_treesitter')
228 " This is deprecated in new nvim releases
229 call srcery#helper#Highlight('TSStrong', s:none, s:none, s:bold)
230 call srcery#helper#Highlight('TSEmphasis', s:none, s:none, s:bold)
231 call srcery#helper#Highlight('TSUnderline', s:none, s:none, s:underline)
232
233 highlight! link TSWarning SrceryOrangeBold
234 highlight! link TSDanger SrceryRedBold
235 highlight! link TSConstBuiltin SrceryCyan
236 highlight! link TSField SrceryGreen
237 highlight! link TSFuncBuiltin SrceryYellow
238 highlight! link TSFuncMacro SrceryOrange
239 highlight! link TSFunction SrceryYellow
240 call srcery#helper#Highlight('TSNamespace', s:white, s:none, s:italic)
241 call srcery#helper#Highlight('TSParameter', s:cyan, s:none, s:italic)
242 highlight! link TSProperty SrceryBrightBlue
243 highlight! link TSSymbol SrceryBlue
244 highlight! link TSTag SrceryBlue
245 highlight! link TSTagAttribute SrceryYellow
246 highlight! link TSVariableBuiltin SrceryCyan
247 highlight! link TSType SrceryWhite
248 highlight! link TSDelimiter SrceryWhite
249 highlight! link TSURI SrceryGreen
250 highlight! link TSVariable SrceryBrightWhite
251
252 if has('nvim-0.8')
253 " TODO: Implement new nvim syntax
254 " Example could be taken from: https://github.com/dracula/vim/blob/b9f4f3a169266031d3744335595eee02a6e396c6/after/plugin/dracula.vim#L103
255 endif
256 endif
257
258 " }}}
259 endif
260
261 " }}}
262
263 " vim: fdm=marker ts=2 sts=2 sw=2 fdl=0: