aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/lsp_markdown.vim10
-rw-r--r--runtime/syntax/synload.vim3
2 files changed, 10 insertions, 3 deletions
diff --git a/runtime/syntax/lsp_markdown.vim b/runtime/syntax/lsp_markdown.vim
index d9b50be54c..90d3185673 100644
--- a/runtime/syntax/lsp_markdown.vim
+++ b/runtime/syntax/lsp_markdown.vim
@@ -10,8 +10,14 @@ execute 'source' expand('<sfile>:p:h') .. '/markdown.vim'
syn cluster mkdNonListItem add=mkdEscape,mkdNbsp
-syntax region mkdEscape matchgroup=mkdEscape start=/\\\ze[\\\x60*{}\[\]()#+\-,.!_>~|"$%&'\/:;<=?@^ ]/ end=/.\zs/ keepend contains=mkdEscapeCh oneline concealends
-syntax match mkdEscapeCh /./ contained
+syn clear markdownEscape
+syntax region markdownEscape matchgroup=markdownEscape start=/\\\ze[\\\x60*{}\[\]()#+\-,.!_>~|"$%&'\/:;<=?@^ ]/ end=/./ containedin=ALL keepend oneline concealends
+
+" conceal html entities
syntax match mkdNbsp /&nbsp;/ conceal cchar=
+syntax match mkdLt /&lt;/ conceal cchar=<
+syntax match mkdGt /&gt;/ conceal cchar=>
+syntax match mkdAmp /&amp;/ conceal cchar=&
+syntax match mkdQuot /&quot;/ conceal cchar="
hi def link mkdEscape special
diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim
index f373161c7c..3863a84c1a 100644
--- a/runtime/syntax/synload.vim
+++ b/runtime/syntax/synload.vim
@@ -55,7 +55,8 @@ fun! s:SynSet()
" load each in sequence. Skip empty entries.
for name in split(s, '\.')
if !empty(name)
- exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
+ exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
+ exe "runtime! syntax/" . name . ".lua syntax/" . name . "/*.lua"
endif
endfor
endif