V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cnobody233
V2EX  ›  Visual Studio Code

vscode 有没有什么插件实现 TS 文件中字符串中代码段高亮。

  •  
  •   cnobody233 · 216 天前 · 1206 次点击
    这是一个创建于 216 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如以下代码,能够识别单引号 / 双引号 / 反引号中的字符串并实现高亮。

    cosnt test = {
      singleCode: 'const a = 2333; console.log(a, 2333)',
      doubleCode: "const b = 2333; console.log(b, 2333)",
      templateCode: `const c = 2333; console.log(c, 2333)`
    }
    
    export default test
    

    目前没找到很好的插件。想根据 TextMate 重写 TS 的高亮规则,但是又不想影响到其他 TS 文件的高亮规则,只针对某一些文件去做处理。也没有很好的思路。跪求大神!!

    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5203 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:40 · PVG 17:40 · LAX 02:40 · JFK 05:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.