Visual Studio Code user snippets not working

后端 未结 18 2080
遥遥无期
遥遥无期 2021-02-01 02:13

I\'ve enabled the default \"log\" snippet in VS Code. I also added another snippet. Neither show up when I type their prefixes. I have set editor.tabCompletion to t

18条回答
  •  北荒
    北荒 (楼主)
    2021-02-01 02:52

    In case anyone else has this issue, I was working with react native and my JavaScript snippets weren't working. I checked settings.json by going to settings, searched for quick suggestions, and then edit in settings.json.

      "files.associations": {
        "*.js": "javascriptreact" // This needed changed to "javascript".
      }
    

    Otherwise, you can create the snippets for javascriptreact.

提交回复
热议问题