Set language for syntax highlighting in Visual Studio Code

后端 未结 6 1089
庸人自扰
庸人自扰 2020-11-30 16:33

Before the confusion begins, this question is about Code, the new lightweight Visual Studio Editor. You can get it from here: https://code.visualstudio.com/

I have a

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 17:27

    To permanently set the language syntax:
    open settings.json file

    *) format all txt files with javascript formatting

    "files.associations": {
            "*.txt": "javascript"
    
     }
    

    *) format all unsaved files (untitled-1 etc) to javascript:

    "files.associations": {
            "untitled-*": "javascript"
    
     }
    

提交回复
热议问题