且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 2017中用于JavaScript和TypeScript文件的Visual Studio代码颜色主题

更新时间:2023-01-27 11:35:03

您能否确认其他TSLS功能在您的安装上是否正常工作? (格式化,完成等)。

Can you confirm that other TSLS features are working correctly on your installation? (formatting, completions, etc).

VS中的TextMate支持存在一个已知问题,有时会出现缺少的颜色。为了确保不是这种情况,您可以尝试从VS Developer cmd提示符运行以下命令以查看它是否解决了问题:
•devenv.exe / updateconfiguration
•devenv.exe / setup

There is a known issue with TextMate support in VS where sometimes there are missing colors. To make sure this isn’t the case here can you try running the following from a VS Developer cmd prompt to see if it resolves the issue: • devenv.exe /updateconfiguration • devenv.exe /setup

你的VS安装目录是什么?
Ex:C:\Program Files [(x86)] \ Microsoft Visual Studio 15.0 \Common7 \IDE

What is your VS installation directory? Ex: C:\Program Files[ (x86)]\Microsoft Visual Studio 15.0\Common7\IDE

tmLanguage文件夹是否存在于TypeScript安装路径?
Ex:C:\Program Files \ Microsoft Visual Studio 15.0\Common\IDE\CommonExtensions\Microsoft\TypeScript\tmLanguage

Does the tmLanguage folder exist under the TypeScript installation path? Ex: C:\Program Files\Microsoft Visual Studio 15.0\Common\IDE\CommonExtensions\Microsoft\TypeScript\tmLanguage

您的用户个人资料中是否有自定义语法文件(.tmLanguage,.tmTheme)?
Ex:%userprofile%.vs \ Extensions

Do you have any custom grammar files (.tmLanguage, .tmTheme) located in your user profile? Ex: %userprofile%.vs\Extensions

您能否确认这不是TM语言缓存问题:

Can you verify this isn’t a TM language caching issue:


  • 关闭VS

  • 转到TexMateCache位置:
    %localappdata%\ Microsoft \ VisualStudio [15.0XXXXX] \ TextMateCache

  • 删除此目录中的所有.cache文件

  • 重新打开VS并尝试重新生成

  • Close VS
  • Go to the TexMateCache location: %localappdata%\Microsoft\VisualStudio[15.0XXXXX]\TextMateCache
  • Delete all the .cache files in this directory
  • Reopen VS and try to repro

这是否解决了这个问题?您是否正确设置了TypeScript TextMate
注册表项?

Does this resolve the issue? Do you have the TypeScript TextMate registry key set correctly?


  • 关闭VS

  • 打开注册表

  • 选择HKLM

  • 文件>加载配置单元...

  • 打开
    %localappdata% \ Mycrosoft \ VisisStudio \15.0_xxx\privateregistry.bin
    (你可以命名hive VS)

  • 现在导航至:
    Computer \HKEY_LOCAL_MACHINE \ VSS \ Software \ Microsoft /\\ VisualStudio \ 15 [XXXXX] _Config\TextMate\Repositories

  • Close VS
  • Open regedit
  • Select HKLM
  • File > Load Hive …
  • Open %localappdata%\Microsoft\VisualStudio\15.0_xxx\privateregistry.bin (you can name the hive VS)
  • Now navigate to: Computer\HKEY_LOCAL_MACHINE\VS\Software\Microsoft\VisualStudio\15[XXXXX]_Config\TextMate\Repositories