admin管理员组文章数量:1328037
As the topic suggests I would like to import/set Visual Studio Code color theme in Visual Studio 2017 for JavaScript and TypeScript files. The files I therefore would like to set color theme for are: .js, .jsx, .ts and .tsx
. If it is not possible to edit per file or language then I would like to know if it is possible to import a whole theme that looks like Visual Studio Code.
In short I would like this:
To look like this:
As the topic suggests I would like to import/set Visual Studio Code color theme in Visual Studio 2017 for JavaScript and TypeScript files. The files I therefore would like to set color theme for are: .js, .jsx, .ts and .tsx
. If it is not possible to edit per file or language then I would like to know if it is possible to import a whole theme that looks like Visual Studio Code.
In short I would like this:
To look like this:
Share Improve this question asked May 13, 2017 at 21:48 OgglasOgglas 70.3k42 gold badges377 silver badges473 bronze badges 1- 2 Did you have any success in the last 2 years? I need this so much – ditoslav Commented Oct 12, 2019 at 15:33
2 Answers
Reset to default 2I did end up finding a way!
TL:DR:
Download JavaScript.tmLanguage and JavaScript.tmTheme.
- Go to %USERPROFILE%\.vs\Extensions\javascript\Syntaxes (%USERPROFILE% usually is C:\Users\{username})
- Create the folders if they are not present.
- Paste the two files
- Restart the VS, should have the vscode highlighting for js, jsx etc files!
If you want to port any vscode theme to Visual Studio,
- In vscode generate color theme from current setting.(Ref.) This will be the tmTheme file
- Get tmLanguage of the language from vscode's repo
- Convert both json to plist. (I used plist)
- Add filetypes to tmLanguage file if its not there.
- Add both to %USERPROFILE%\.vs\Extensions\language\Syntaxes folder.
- Done!
I have tested for VS2019, and as I followed VS docs, it seems like it should work till VS2015.
Screenshot:
Can you confirm that other TSLS features are working correctly on your installation? (formatting, pletions, etc).
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
What is your VS installation directory? Ex: C:\Program Files[ (x86)]\Microsoft Visual Studio 15.0\Common7\IDE
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
Do you have any custom grammar files (.tmLanguage, .tmTheme) located in your user profile? Ex: %userprofile%.vs\Extensions
Can you verify this isn’t a TM language caching issue:
- 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
Does this resolve the issue? Do you have the TypeScript TextMate registry key set correctly?
- 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
版权声明:本文标题:Visual Studio Code color theme in Visual Studio 2017 for JavaScript and TypeScript files - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742242452a2438917.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论