File tree 1 file changed +41
-1
lines changed
1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,44 @@ let s:file_node_pattern_matches = {
340
340
\ ' .*mootools.*\.js$' : s: white
341
341
\}
342
342
343
+ let s: enabled_extensions = [
344
+ \ ' bat' ,
345
+ \ ' bmp' ,
346
+ \ ' c' ,
347
+ \ ' c' ,
348
+ \ ' coffee' ,
349
+ \ ' cpp' ,
350
+ \ ' css' ,
351
+ \ ' erb' ,
352
+ \ ' go' ,
353
+ \ ' html' ,
354
+ \ ' java' ,
355
+ \ ' jpg' ,
356
+ \ ' js' ,
357
+ \ ' json' ,
358
+ \ ' jsx' ,
359
+ \ ' lua' ,
360
+ \ ' markdown' ,
361
+ \ ' md' ,
362
+ \ ' php' ,
363
+ \ ' png' ,
364
+ \ ' py' ,
365
+ \ ' rb' ,
366
+ \ ' scala' ,
367
+ \ ' scss' ,
368
+ \ ' sh' ,
369
+ \ ' sql' ,
370
+ \ ' vim' ,
371
+ \]
372
+
373
+ if ! exists (' g:NERDTreeSyntaxEnabledExtensions' )
374
+ let g: NERDTreeSyntaxEnabledExtensions = []
375
+ endif
376
+
377
+ for extension in s: enabled_extensions
378
+ call add (g: NERDTreeSyntaxEnabledExtensions , extension)
379
+ endfor
380
+
343
381
let s: characters = ' [a-zA-Z0-9_\#\-\+\*\%\!\~\(\)\{\}\&\.\$\@]'
344
382
345
383
" Extension colors
@@ -349,7 +387,9 @@ if !exists('g:NERDTreeExtensionHighlightColor')
349
387
endif
350
388
351
389
for [key , val] in items (s: file_extension_colors )
352
- if ! has_key (g: NERDTreeExtensionHighlightColor , key )
390
+ if ! has_key (g: NERDTreeExtensionHighlightColor , key ) &&
391
+ \ (! exists (' g:NERDTreeLimitedSyntax' ) ||
392
+ \ index (g: NERDTreeSyntaxEnabledExtensions , key ) >= 0 )
353
393
let g: NERDTreeExtensionHighlightColor [key ] = val
354
394
endif
355
395
endfor
You can’t perform that action at this time.
0 commit comments