othree / yajs.vim

YAJS.vim: Yet Another JavaScript Syntax for Vim
http://www.vim.org/scripts/script.php?script_id=4974
Vim License
688 stars 41 forks source link

Highlight expressions in Template literals (Template strings) #173

Closed Endle closed 5 years ago

Endle commented 5 years ago

I'm not sure if this is caused by plugin conflict, but othree/yajs.vim failed to highlight template strings

Sample code

    let qBaseStr = `<div id="description">
                        <p>${q.Desc}</p>
                        <div id="hint">${multiHint}</div>
                    </div>`;

With no plugins (clean .vim) without

othree/yajs.vim is the only plugin installed withonly

My vim's behaviour before othree/yajs.vim is installed before

My vim's behaviour after othree/yajs.vim is installed with

The ${expression} is really insignificant here. I wonder if this grammar is highlighted?

Thank you

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

othree commented 5 years ago

Yes, inside the ${}. Codes will highlight.