lukas-tr/vscode-materialdesignicons-intellisense

Trying to make a custom matcher for React Native Vector Icon

kuasha420 opened this issue · 4 comments

Hello

I'm truing to match the following format but so far having partial success with it.

<Icon name="{param}"

and

icon="{param}"

{
      "match": "\\bname\\=\"{param}\"\\b",
      "insert": "{param}",
      "displayName": "React Native Vector Icon",
      "name": "rnvec"
    },
    {
      "match": "\\bicon\\=\"{param}\"\\b",
      "insert": "{param}",
      "displayName": "React Native Icon Props",
      "name": "rnicon"
    }

I can get the intelisense but the little preview icon in the left side is not working.

Help would be greatly appreciated!

Is just the preview on the left not working or does the hover preview also not show up?

@lukas-tr The hover preview also doesn't show up. Only intelisense works

\b matches word boundaries (a \w followed/preceded by a \W character). Remove the \b at the end and your're good.

        {
            "match": "\\bname\\=\"{param}\"",
            "insert": "{param}",
            "displayName": "React Native Vector Icon",
            "name": "rnvec"
        },
        {
            "match": "\\bicon\\=\"{param}\"",
            "insert": "{param}",
            "displayName": "React Native Icon Props",
            "name": "rnicon"
        }

@lukas-tr Thanks a bunch!