mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-12 21:43:49 -05:00
Make sure custom scripts.vim are respected as well
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user