Make sure custom scripts.vim are respected as well

This commit is contained in:
Adam Stankiewicz
2020-10-17 17:40:10 +02:00
parent 0021384259
commit 518d733369
11 changed files with 2376 additions and 89 deletions

View File

@@ -2,30 +2,30 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
if v:version < 600
syntax clear
elseif exists("b:current_syntax")
elseif exists('b:current_syntax')
finish
endif
" Keep user-supplied options
if !exists("nim_highlight_numbers")
if !exists('nim_highlight_numbers')
let nim_highlight_numbers = 1
endif
if !exists("nim_highlight_builtins")
if !exists('nim_highlight_builtins')
let nim_highlight_builtins = 1
endif
if !exists("nim_highlight_exceptions")
if !exists('nim_highlight_exceptions')
let nim_highlight_exceptions = 1
endif
if !exists("nim_highlight_space_errors")
if !exists('nim_highlight_space_errors')
let nim_highlight_space_errors = 1
endif
if !exists("nim_highlight_special_vars")
if !exists('nim_highlight_special_vars')
let nim_highlight_special_vars = 1
endif
if exists("nim_highlight_all")
if exists('nim_highlight_all')
let nim_highlight_numbers = 1
let nim_highlight_builtins = 1
let nim_highlight_exceptions = 1
@@ -158,8 +158,8 @@ syn sync match nimSync grouphere NONE "):$"
syn sync maxlines=200
syn sync minlines=2000
if version >= 508 || !exists("did_nim_syn_inits")
if version <= 508
if v:version >= 508 || !exists('did_nim_syn_inits')
if v:version <= 508
let did_nim_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
@@ -202,7 +202,7 @@ if version >= 508 || !exists("did_nim_syn_inits")
delcommand HiLink
endif
let b:current_syntax = "nim"
let b:current_syntax = 'nim'
endif