admin管理员组

文章数量:1290950

I have string literals in javascript code and they have attributes whose values ​​are methods, for example:

const test = `<div data-click="foo">test<div>`;

function foo() {}

And I'm trying to make "foo" highlighted separately, not just as a string, and so that you can use ctrl+b to go to the method:

I'm trying to use Language injection what am I doing wrong?

I have string literals in javascript code and they have attributes whose values ​​are methods, for example:

const test = `<div data-click="foo">test<div>`;

function foo() {}

And I'm trying to make "foo" highlighted separately, not just as a string, and so that you can use ctrl+b to go to the method:

I'm trying to use Language injection what am I doing wrong?

Share Improve this question asked Feb 13 at 23:18 alex10alex10 2,7683 gold badges23 silver badges35 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

I believe this can be achieved by copying the built-in setting “*/@on.” and replacing the argument “on” with “data-click.” However, in my case, the configuration persistence after editing turned out to be broken.

本文标签: javascriptLighting and transitions for custom attribute values ​in WebStormStack Overflow