Skip to content
索引

packages.json

vscode的一些设置需要在packages.json配置

activationEvents

vscode插件的激活事件

json
"activationEvents": [
  "onLanguage:javascript",
  "onLanguage:javascriptreact",
  "onLanguage:typescript",
  "onLanguage:typescriptreact",
  "onLanguage:vue",
  "onLanguage:vue-html",
  "onLanguage:json",
  "onCommand:vscode-path-alias.toSecondDefinition"
 ],
"activationEvents": [
  "onLanguage:javascript",
  "onLanguage:javascriptreact",
  "onLanguage:typescript",
  "onLanguage:typescriptreact",
  "onLanguage:vue",
  "onLanguage:vue-html",
  "onLanguage:json",
  "onCommand:vscode-path-alias.toSecondDefinition"
 ],

onLanguage表示在该语言的文件中触发

onCommand表示通过该命令触发

已知语言标识符

语言标识符
ABAPabap
Windows Batbat
BibTeXbibtex
Clojureclojure
Coffeescriptcoffeescript
Cc
C++cpp
C#csharp
CUDA C++cuda-cpp
CSScss
Diffdiff
Dockerfiledockerfile
F#fsharp
Gitgit-commit and git-rebase
Gogo
Groovygroovy
Handlebarshandlebars
Hamlhaml
HTMLhtml
Iniini
Javajava
JavaScriptjavascript
JavaScript Reactjavascriptreact
JSONjson
JSON with Commentsjsonc
LaTeXlatex
Lessless
Lualua
Makefilemakefile
Markdownmarkdown
Objective-Cobjective-c
Objective-C++objective-cpp
Perlperl and perl6
PHPphp
Plain Textplaintext
PowerShellpowershell
Pugjade, pug
Pythonpython
Rr
Razor (cshtml)razor
Rubyruby
Rustrust
SCSSscss (使用花括号的语法), sass (缩进语法)
ShaderLabshaderlab
Shell Script (Bash)shellscript
Slimslim
SQLsql
Stylusstylus
Swiftswift
TypeScripttypescript
TypeScript Reacttypescriptreact
TeXtex
Visual Basicvb
Vuevue
Vue HTMLvue-html
XMLxml
XSLxsl
YAMLyaml

Released under the MIT License.