From 60930a968d26fc7abf4f8fd5c3926bdcda2dd787 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 22 Oct 2020 08:22:30 +0900 Subject: [PATCH] Fix syntax --- plugin/emmet.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/emmet.vim b/plugin/emmet.vim index f894c90..dad03a8 100644 --- a/plugin/emmet.vim +++ b/plugin/emmet.vim @@ -174,9 +174,15 @@ if get(g:, 'user_emmet_install_command', 1) command! -nargs=1 Emmet call emmet#expandAbbr(4, ) endif +function! s:setup_styledEmmetAbbreviation() abort + if index(['javascript', 'javascriptreact', 'typescript', 'typescriptreact'], &filetype) != -1 + syntax match styledEmmetAbbreviation "[a-z0-9#+!%]\+" containedin=styledDefinition contained + endif +endfunction + augroup ___emmet_setup___ au! - autocmd Syntax * syntax match styledEmmetAbbreviation "[a-z0-9#+!%]\+" containedin=styledDefinition contained + autocmd Syntax * call s:setup_styledEmmetAbbreviation() augroup END let &cpoptions = s:save_cpo