summaryrefslogtreecommitdiffstats
path: root/syntax/html
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-25 03:19:58 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-25 03:19:58 +0100
commitcbde2571d4f79770ac552fe75440de72893bc73a (patch)
treec6bf43ecbf9ed76071713dc4cba028d32695987a /syntax/html
parentd73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 (diff)
downloadvim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.tar.gz
vim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.zip
Respect symlinks for resolving vim-polyglot as fallback, closes #605
Diffstat (limited to '')
-rw-r--r--syntax/html.vim9
-rw-r--r--syntax/htmldjango.vim9
-rw-r--r--syntax/htmlm4.vim9
3 files changed, 3 insertions, 24 deletions
diff --git a/syntax/html.vim b/syntax/html.vim
index a505da2a..23d33446 100644
--- a/syntax/html.vim
+++ b/syntax/html.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/html.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('html', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1
" Vim syntax file
" Language: HTML
@@ -345,5 +340,3 @@ endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8
-
-endif
diff --git a/syntax/htmldjango.vim b/syntax/htmldjango.vim
index 0282f30c..cd7e4660 100644
--- a/syntax/htmldjango.vim
+++ b/syntax/htmldjango.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/htmldjango.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('htmldjango', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmldjango') == -1
" Vim syntax file
" Language: Django HTML template
@@ -33,5 +28,3 @@ syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomm
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
let b:current_syntax = "htmldjango"
-
-endif
diff --git a/syntax/htmlm4.vim b/syntax/htmlm4.vim
index 834c86bf..6294526f 100644
--- a/syntax/htmlm4.vim
+++ b/syntax/htmlm4.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/htmlm4.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('htmlm4', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmlm4') == -1
" Vim syntax file
" Language: HTML and M4
@@ -38,5 +33,3 @@ let b:current_syntax = "htmlm4"
if main_syntax == 'htmlm4'
unlet main_syntax
endif
-
-endif