snippets在tsx和jsx不可用的问题

810 阅读1分钟

之前这样写的

 "log": {
    "scope": "javascript,typescript,jsx,tsx",
    "prefix": "log",
    "body": ["console.log('$1:', $1)"],
    "description": "Log output to console"
  }

snippets在jsx和tsx不起作用

查了一下stackoverflow.com/questions/5…

jsx需要写作javascriptreact

tsx需要协作typescriptreact

"log": {
    "scope": "javascript,typescript,javascriptreact,typescriptreact",
    "prefix": "log",
    "body": ["console.log('$1:', $1)"],
    "description": "Log output to console"
  },

ctrl+shift+p 输入snippets设置