├── .azure-pipelines ├── publish-nightly.yml └── publish-stable.yml ├── .devcontainer └── devcontainer.json ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── 1_bug_report.yaml │ ├── 2_feature_request.yaml │ ├── 3_other.md │ └── config.yml ├── publish-failure-issue-template.md └── workflows │ ├── ci.yml │ └── website.yml ├── .gitignore ├── .husky └── pre-commit ├── .mocharc.json ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── MAINTAINING.md ├── README.md ├── SECURITY.md ├── ThirdPartyNotices.txt ├── build ├── build-languages.ts ├── build-monaco-editor.ts ├── check-samples.ts ├── fillers │ └── vscode-nls.ts ├── fs.ts ├── importTypescript.ts ├── npm │ ├── installAll.ts │ └── removeAll.ts ├── postinstall.ts ├── releaseMetadata.ts ├── simpleserver.ts ├── tsconfig.json └── utils.ts ├── docs ├── code-structure.dio.svg ├── debugging-core.gif ├── debugging-languages.gif ├── integrate-amd.md ├── integrate-esm.md ├── launch config.png └── out-folders.dio.svg ├── editor.code-workspace ├── gulpfile.js ├── package-lock.json ├── package.json ├── samples ├── README.md ├── browser-amd-diff-editor │ ├── index.html │ ├── modified.txt │ └── original.txt ├── browser-amd-editor │ └── index.html ├── browser-amd-iframe │ ├── index.html │ └── inner.html ├── browser-amd-localized │ └── index.html ├── browser-amd-monarch │ └── index.html ├── browser-amd-requirejs │ └── index.html ├── browser-amd-shadow-dom │ └── index.html ├── browser-amd-shared-model │ └── index.html ├── browser-amd-trusted-types │ └── index.html ├── browser-esm-esbuild │ ├── .gitignore │ ├── build.js │ ├── dist │ │ └── index.html │ ├── index.html │ ├── index.js │ └── package.json ├── browser-esm-parcel │ ├── .gitignore │ ├── index.html │ ├── package-lock.json │ ├── package.json │ └── src │ │ ├── index.html │ │ └── index.js ├── browser-esm-vite-react │ ├── .gitignore │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── Editor.module.css │ │ │ └── Editor.tsx │ │ ├── main.tsx │ │ ├── userWorker.ts │ │ └── vite-env.d.ts │ ├── tsconfig.json │ └── vite.config.ts ├── browser-esm-webpack-monaco-plugin │ ├── .gitignore │ ├── dist │ │ └── index.html │ ├── index.html │ ├── index.js │ ├── package.json │ └── webpack.config.js ├── browser-esm-webpack-small │ ├── .gitignore │ ├── dist │ │ └── index.html │ ├── generate-imports.js │ ├── index.html │ ├── index.js │ ├── package.json │ └── webpack.config.js ├── browser-esm-webpack-typescript-react │ ├── .gitignore │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── components │ │ │ └── Editor.tsx │ │ ├── index.css │ │ ├── index.html │ │ └── index.tsx │ ├── tsconfig.json │ └── webpack.config.js ├── browser-esm-webpack-typescript │ ├── .gitignore │ ├── package.json │ ├── src │ │ ├── index.css │ │ └── index.ts │ ├── tsconfig.json │ └── webpack.config.js ├── browser-esm-webpack │ ├── .gitignore │ ├── dist │ │ └── index.html │ ├── index.html │ ├── index.js │ ├── package.json │ └── webpack.config.js ├── browser-script-editor │ └── index.html ├── electron-amd-nodeIntegration │ ├── electron-index.html │ ├── index.html │ ├── main.js │ └── package.json ├── electron-amd │ ├── electron-index.html │ ├── index.html │ ├── main.js │ └── package.json ├── electron-esm-webpack │ ├── .gitignore │ ├── dist │ │ └── electron-index.html │ ├── index.js │ ├── main.js │ ├── package.json │ └── webpack.config.js ├── nwjs-amd-v2 │ └── index.html ├── nwjs-amd │ └── index.html ├── package-lock.json └── package.json ├── scripts ├── ci │ ├── env.ts │ ├── monaco-editor-core-prepare.ts │ ├── monaco-editor-core.sh │ ├── monaco-editor-prepare.ts │ └── monaco-editor.sh └── lib │ └── index.ts ├── src ├── basic-languages │ ├── _.contribution.ts │ ├── abap │ │ ├── abap.contribution.ts │ │ ├── abap.test.ts │ │ └── abap.ts │ ├── apex │ │ ├── apex.contribution.ts │ │ ├── apex.test.ts │ │ └── apex.ts │ ├── azcli │ │ ├── azcli.contribution.ts │ │ ├── azcli.test.ts │ │ └── azcli.ts │ ├── bat │ │ ├── bat.contribution.ts │ │ ├── bat.test.ts │ │ └── bat.ts │ ├── bicep │ │ ├── bicep.contribution.ts │ │ ├── bicep.test.ts │ │ └── bicep.ts │ ├── cameligo │ │ ├── cameligo.contribution.ts │ │ ├── cameligo.test.ts │ │ └── cameligo.ts │ ├── clojure │ │ ├── clojure.contribution.ts │ │ ├── clojure.test.ts │ │ └── clojure.ts │ ├── coffee │ │ ├── coffee.contribution.ts │ │ ├── coffee.test.ts │ │ └── coffee.ts │ ├── cpp │ │ ├── cpp.contribution.ts │ │ ├── cpp.test.ts │ │ └── cpp.ts │ ├── csharp │ │ ├── csharp.contribution.ts │ │ ├── csharp.test.ts │ │ └── csharp.ts │ ├── csp │ │ ├── csp.contribution.ts │ │ ├── csp.test.ts │ │ └── csp.ts │ ├── css │ │ ├── css.contribution.ts │ │ ├── css.test.ts │ │ └── css.ts │ ├── cypher │ │ ├── cypher.contribution.ts │ │ ├── cypher.test.ts │ │ └── cypher.ts │ ├── dart │ │ ├── dart.contribution.ts │ │ ├── dart.test.ts │ │ └── dart.ts │ ├── dockerfile │ │ ├── dockerfile.contribution.ts │ │ ├── dockerfile.test.ts │ │ └── dockerfile.ts │ ├── ecl │ │ ├── ecl.contribution.ts │ │ ├── ecl.test.ts │ │ └── ecl.ts │ ├── elixir │ │ ├── elixir.contribution.ts │ │ ├── elixir.test.ts │ │ └── elixir.ts │ ├── flow9 │ │ ├── flow9.contribution.ts │ │ ├── flow9.test.ts │ │ └── flow9.ts │ ├── freemarker2 │ │ ├── freemarker2-angle-bracket.test.ts │ │ ├── freemarker2-angle-dollar.test.ts │ │ ├── freemarker2-auto-bracket.test.ts │ │ ├── freemarker2-auto-dollar.test.ts │ │ ├── freemarker2-bracket-bracket.test.ts │ │ ├── freemarker2-bracket-dollar.test.ts │ │ ├── freemarker2.contribution.ts │ │ └── freemarker2.ts │ ├── fsharp │ │ ├── fsharp.contribution.ts │ │ ├── fsharp.test.ts │ │ └── fsharp.ts │ ├── go │ │ ├── go.contribution.ts │ │ ├── go.test.ts │ │ └── go.ts │ ├── graphql │ │ ├── graphql.contribution.ts │ │ ├── graphql.test.ts │ │ └── graphql.ts │ ├── handlebars │ │ ├── handlebars.contribution.ts │ │ ├── handlebars.test.ts │ │ └── handlebars.ts │ ├── hcl │ │ ├── hcl.contribution.ts │ │ ├── hcl.test.ts │ │ └── hcl.ts │ ├── html │ │ ├── html.contribution.ts │ │ ├── html.test.ts │ │ └── html.ts │ ├── ini │ │ ├── ini.contribution.ts │ │ └── ini.ts │ ├── java │ │ ├── java.contribution.ts │ │ ├── java.test.ts │ │ └── java.ts │ ├── javascript │ │ ├── javascript.contribution.ts │ │ ├── javascript.test.ts │ │ └── javascript.ts │ ├── julia │ │ ├── julia.contribution.ts │ │ ├── julia.test.ts │ │ └── julia.ts │ ├── kotlin │ │ ├── kotlin.contribution.ts │ │ ├── kotlin.test.ts │ │ └── kotlin.ts │ ├── less │ │ ├── less.contribution.ts │ │ ├── less.test.ts │ │ └── less.ts │ ├── lexon │ │ ├── lexon.contribution.ts │ │ ├── lexon.test.ts │ │ └── lexon.ts │ ├── liquid │ │ ├── liquid.contribution.ts │ │ ├── liquid.test.ts │ │ └── liquid.ts │ ├── lua │ │ ├── lua.contribution.ts │ │ ├── lua.test.ts │ │ └── lua.ts │ ├── m3 │ │ ├── m3.contribution.ts │ │ ├── m3.test.ts │ │ └── m3.ts │ ├── markdown │ │ ├── markdown.contribution.ts │ │ ├── markdown.test.ts │ │ └── markdown.ts │ ├── mdx │ │ ├── mdx.contribution.ts │ │ ├── mdx.test.ts │ │ └── mdx.ts │ ├── mips │ │ ├── mips.contribution.ts │ │ ├── mips.test.ts │ │ └── mips.ts │ ├── monaco.contribution.ts │ ├── msdax │ │ ├── msdax.contribution.ts │ │ ├── msdax.test.ts │ │ └── msdax.ts │ ├── mysql │ │ ├── keywords.js │ │ ├── keywords.mysql.txt │ │ ├── mysql.contribution.ts │ │ ├── mysql.test.ts │ │ └── mysql.ts │ ├── objective-c │ │ ├── objective-c.contribution.ts │ │ ├── objective-c.test.ts │ │ └── objective-c.ts │ ├── pascal │ │ ├── pascal.contribution.ts │ │ ├── pascal.test.ts │ │ └── pascal.ts │ ├── pascaligo │ │ ├── pascaligo.contribution.ts │ │ ├── pascaligo.test.ts │ │ └── pascaligo.ts │ ├── perl │ │ ├── perl.contribution.ts │ │ ├── perl.test.ts │ │ └── perl.ts │ ├── pgsql │ │ ├── keywords.js │ │ ├── keywords.postgresql.txt │ │ ├── pgsql.contribution.ts │ │ ├── pgsql.test.ts │ │ └── pgsql.ts │ ├── php │ │ ├── php.contribution.ts │ │ ├── php.test.ts │ │ └── php.ts │ ├── pla │ │ ├── pla.contribution.ts │ │ ├── pla.test.ts │ │ └── pla.ts │ ├── postiats │ │ ├── postiats.contribution.ts │ │ ├── postiats.test.ts │ │ └── postiats.ts │ ├── powerquery │ │ ├── powerquery.contribution.ts │ │ ├── powerquery.test.ts │ │ └── powerquery.ts │ ├── powershell │ │ ├── powershell.contribution.ts │ │ ├── powershell.test.ts │ │ └── powershell.ts │ ├── protobuf │ │ ├── protobuf.contribution.ts │ │ ├── protobuf.test.ts │ │ └── protobuf.ts │ ├── pug │ │ ├── pug.contribution.ts │ │ ├── pug.test.ts │ │ └── pug.ts │ ├── python │ │ ├── python.contribution.ts │ │ ├── python.test.ts │ │ └── python.ts │ ├── qsharp │ │ ├── qsharp.contribution.ts │ │ ├── qsharp.test.ts │ │ └── qsharp.ts │ ├── r │ │ ├── r.contribution.ts │ │ ├── r.test.ts │ │ └── r.ts │ ├── razor │ │ ├── razor.contribution.ts │ │ ├── razor.test.ts │ │ └── razor.ts │ ├── redis │ │ ├── redis.contribution.ts │ │ ├── redis.test.ts │ │ └── redis.ts │ ├── redshift │ │ ├── redshift.contribution.ts │ │ ├── redshift.test.ts │ │ └── redshift.ts │ ├── restructuredtext │ │ ├── restructuredtext.contribution.ts │ │ ├── restructuredtext.test.ts │ │ └── restructuredtext.ts │ ├── ruby │ │ ├── ruby.contribution.ts │ │ ├── ruby.test.ts │ │ └── ruby.ts │ ├── rust │ │ ├── rust.contribution.ts │ │ ├── rust.test.ts │ │ └── rust.ts │ ├── sb │ │ ├── sb.contribution.ts │ │ ├── sb.test.ts │ │ └── sb.ts │ ├── scala │ │ ├── scala.contribution.ts │ │ ├── scala.test.ts │ │ └── scala.ts │ ├── scheme │ │ ├── scheme.contribution.ts │ │ ├── scheme.test.ts │ │ └── scheme.ts │ ├── scss │ │ ├── scss.contribution.ts │ │ ├── scss.test.ts │ │ └── scss.ts │ ├── shell │ │ ├── shell.contribution.ts │ │ ├── shell.test.ts │ │ └── shell.ts │ ├── solidity │ │ ├── solidity.contribution.ts │ │ ├── solidity.test.ts │ │ └── solidity.ts │ ├── sophia │ │ ├── sophia.contribution.ts │ │ ├── sophia.test.ts │ │ └── sophia.ts │ ├── sparql │ │ ├── sparql.contribution.ts │ │ ├── sparql.test.ts │ │ └── sparql.ts │ ├── sql │ │ ├── keywords.js │ │ ├── sql.contribution.ts │ │ ├── sql.test.ts │ │ └── sql.ts │ ├── st │ │ ├── st.contribution.ts │ │ ├── st.test.ts │ │ └── st.ts │ ├── swift │ │ ├── swift.contribution.ts │ │ ├── swift.test.ts │ │ └── swift.ts │ ├── systemverilog │ │ ├── systemverilog.contribution.ts │ │ ├── systemverilog.test.ts │ │ └── systemverilog.ts │ ├── tcl │ │ ├── tcl.contribution.ts │ │ ├── tcl.test.ts │ │ └── tcl.ts │ ├── test │ │ └── testRunner.ts │ ├── twig │ │ ├── twig.contribution.ts │ │ ├── twig.test.ts │ │ └── twig.ts │ ├── typescript │ │ ├── typescript.contribution.ts │ │ ├── typescript.test.ts │ │ └── typescript.ts │ ├── typespec │ │ ├── typespec.contribution.ts │ │ ├── typespec.test.ts │ │ └── typespec.ts │ ├── vb │ │ ├── vb.contribution.ts │ │ ├── vb.test.ts │ │ └── vb.ts │ ├── wgsl │ │ ├── wgsl.contribution.ts │ │ ├── wgsl.test.ts │ │ └── wgsl.ts │ ├── xml │ │ ├── xml.contribution.ts │ │ ├── xml.test.ts │ │ └── xml.ts │ └── yaml │ │ ├── yaml.contribution.ts │ │ ├── yaml.test.ts │ │ └── yaml.ts ├── fillers │ ├── editor.api.d.ts │ ├── monaco-editor-core-amd.ts │ └── monaco-editor-core.ts ├── language │ ├── common │ │ └── lspLanguageFeatures.ts │ ├── css │ │ ├── css.worker.ts │ │ ├── cssMode.ts │ │ ├── cssWorker.ts │ │ ├── monaco.contribution.ts │ │ └── workerManager.ts │ ├── html │ │ ├── html.worker.ts │ │ ├── htmlMode.ts │ │ ├── htmlWorker.ts │ │ ├── monaco.contribution.ts │ │ └── workerManager.ts │ ├── json │ │ ├── json.worker.ts │ │ ├── jsonMode.ts │ │ ├── jsonWorker.ts │ │ ├── monaco.contribution.ts │ │ ├── tokenization.ts │ │ └── workerManager.ts │ └── typescript │ │ ├── languageFeatures.ts │ │ ├── lib │ │ ├── editor.worker.d.ts │ │ ├── lib.index.ts │ │ ├── lib.ts │ │ ├── typescriptServices.d.ts │ │ ├── typescriptServices.js │ │ └── typescriptServicesMetadata.ts │ │ ├── monaco.contribution.ts │ │ ├── ts.worker.ts │ │ ├── tsMode.ts │ │ ├── tsWorker.ts │ │ └── workerManager.ts ├── nls-fix.js └── tsconfig.json ├── test ├── manual │ ├── cross-origin.html │ ├── dev-setup.js │ ├── diff.html │ ├── diff.js │ ├── iframe-inner.html │ ├── iframe.html │ ├── index.css │ ├── index.html │ ├── index.js │ ├── mouse-fixed.html │ ├── mouse-scrollable-body.html │ ├── mouse-scrollable-element.html │ ├── samples.js │ ├── samples │ │ ├── run-editor-failing-js.txt │ │ ├── run-editor-intellisense-js.txt │ │ ├── run-editor-jquery-min-js.txt │ │ ├── run-editor-korean.txt │ │ ├── run-editor-sample-big-css.txt │ │ ├── run-editor-sample-bom-cs.txt │ │ ├── run-editor-sample-cr-ps1.txt │ │ ├── run-editor-sample-dynamic.txt │ │ ├── run-editor-sample-f12-css.txt │ │ ├── run-editor-sample-html.txt │ │ ├── run-editor-sample-js.txt │ │ └── run-editor-sample-msn-js.txt │ ├── shadow-dom.html │ ├── transform.html │ └── typescript │ │ ├── custom-worker.html │ │ ├── custom-worker.js │ │ └── index.html ├── smoke │ ├── amd │ │ └── index.html │ ├── common.js │ ├── esbuild │ │ ├── index.html │ │ └── index.js │ ├── package-esbuild.ts │ ├── package-vite.ts │ ├── package-webpack.ts │ ├── parcel │ │ ├── index.html │ │ ├── index.js │ │ └── package.json │ ├── runner.js │ ├── smoke.test.js │ ├── vite │ │ ├── index.html │ │ └── index.js │ └── webpack │ │ ├── index.html │ │ └── index.js └── unit │ ├── all.js │ └── setup.js ├── webpack-plugin ├── .npmignore ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── src │ ├── index.ts │ ├── loader-utils.d.ts │ ├── loaders │ │ └── include.ts │ ├── plugins │ │ └── AddWorkerEntryPointPlugin.ts │ └── types.ts └── tsconfig.json └── website ├── .gitignore ├── .prettierrc.json ├── index └── samples │ └── sample.mdx.txt ├── package.json ├── scripts └── check-playground-samples-js.ts ├── src ├── monaco-loader.ts ├── runner │ ├── debug.ts │ ├── index.ts │ └── style.scss ├── shared.ts ├── tsconfig.json ├── types.d.ts └── website │ ├── bootstrap.scss │ ├── code-oss.svg │ ├── components │ ├── Loader.tsx │ ├── Nav.tsx │ ├── Page.tsx │ ├── Radio.tsx │ ├── Select.tsx │ ├── TextBox.tsx │ ├── bootstrap.tsx │ └── monaco │ │ ├── MonacoEditor.tsx │ │ └── MonacoLoader.tsx │ ├── data │ ├── diff-sample │ │ ├── modified.txt │ │ └── original.txt │ ├── home-samples │ │ ├── sample.abap.txt │ │ ├── sample.aes.txt │ │ ├── sample.apex.txt │ │ ├── sample.azcli.txt │ │ ├── sample.bat.txt │ │ ├── sample.bicep.txt │ │ ├── sample.c.txt │ │ ├── sample.cameligo.txt │ │ ├── sample.clojure.txt │ │ ├── sample.coffeescript.txt │ │ ├── sample.cpp.txt │ │ ├── sample.csharp.txt │ │ ├── sample.csp.txt │ │ ├── sample.css.txt │ │ ├── sample.cypher.txt │ │ ├── sample.dart.txt │ │ ├── sample.dockerfile.txt │ │ ├── sample.ecl.txt │ │ ├── sample.elixir.txt │ │ ├── sample.flow9.txt │ │ ├── sample.freemarker2.tag-angle.interpolation-bracket.txt │ │ ├── sample.freemarker2.tag-angle.interpolation-dollar.txt │ │ ├── sample.freemarker2.tag-auto.interpolation-bracket.txt │ │ ├── sample.freemarker2.tag-auto.interpolation-dollar.txt │ │ ├── sample.freemarker2.tag-bracket.interpolation-bracket.txt │ │ ├── sample.freemarker2.tag-bracket.interpolation-dollar.txt │ │ ├── sample.freemarker2.txt │ │ ├── sample.fsharp.txt │ │ ├── sample.go.txt │ │ ├── sample.graphql.txt │ │ ├── sample.handlebars.txt │ │ ├── sample.hcl.txt │ │ ├── sample.html.txt │ │ ├── sample.ini.txt │ │ ├── sample.java.txt │ │ ├── sample.javascript.txt │ │ ├── sample.json.txt │ │ ├── sample.julia.txt │ │ ├── sample.kotlin.txt │ │ ├── sample.less.txt │ │ ├── sample.lex.txt │ │ ├── sample.lexon.txt │ │ ├── sample.liquid.txt │ │ ├── sample.lua.txt │ │ ├── sample.m3.txt │ │ ├── sample.markdown.txt │ │ ├── sample.mdx.txt │ │ ├── sample.mips.txt │ │ ├── sample.msdax.txt │ │ ├── sample.mysql.txt │ │ ├── sample.objective-c.txt │ │ ├── sample.pascal.txt │ │ ├── sample.pascaligo.txt │ │ ├── sample.perl.txt │ │ ├── sample.pgsql.txt │ │ ├── sample.php.txt │ │ ├── sample.pla.txt │ │ ├── sample.plaintext.txt │ │ ├── sample.postiats.txt │ │ ├── sample.powerquery.txt │ │ ├── sample.powershell.txt │ │ ├── sample.proto.txt │ │ ├── sample.pug.txt │ │ ├── sample.python.txt │ │ ├── sample.qsharp.txt │ │ ├── sample.r.txt │ │ ├── sample.razor.txt │ │ ├── sample.redis.txt │ │ ├── sample.redshift.txt │ │ ├── sample.restructuredtext.txt │ │ ├── sample.ruby.txt │ │ ├── sample.rust.txt │ │ ├── sample.sb.txt │ │ ├── sample.scala.txt │ │ ├── sample.scheme.txt │ │ ├── sample.scss.txt │ │ ├── sample.shell.txt │ │ ├── sample.sol.txt │ │ ├── sample.sparql.txt │ │ ├── sample.sql.txt │ │ ├── sample.st.txt │ │ ├── sample.swift.txt │ │ ├── sample.systemverilog.txt │ │ ├── sample.tcl.txt │ │ ├── sample.twig.txt │ │ ├── sample.typescript.txt │ │ ├── sample.typespec.txt │ │ ├── sample.vb.txt │ │ ├── sample.verilog.txt │ │ ├── sample.wgsl.txt │ │ ├── sample.xml.txt │ │ └── sample.yaml.txt │ └── playground-samples │ │ ├── all.js │ │ ├── creating-the-diffeditor │ │ ├── chapter.json │ │ ├── hello-diff-world │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── inline-diff-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ └── multi-line-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── creating-the-editor │ │ ├── chapter.json │ │ ├── editor-basic-options │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── hard-wrapping │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── hello-world │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── syntax-highlighting-for-html-elements │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ └── web-component │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── customizing-the-appearence │ │ ├── chapter.json │ │ ├── exposed-colors │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── scrollbars │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ └── tokens-and-colors │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── extending-language-services │ │ ├── chapter.json │ │ ├── codelens-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── color-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── completion-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── configure-javascript-defaults │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── configure-json-defaults │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── custom-languages │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── folding-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── hover-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── inlay-hints-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── model-markers-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ ├── semantic-tokens-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ └── symbols-provider-example │ │ │ ├── sample.css │ │ │ ├── sample.html │ │ │ ├── sample.js │ │ │ └── sample.json │ │ └── interacting-with-the-editor │ │ ├── adding-a-command-to-an-editor-instance │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ ├── adding-a-keybinding-to-an-existing-command │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ ├── adding-an-action-to-an-editor-instance │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ ├── chapter.json │ │ ├── customizing-the-line-numbers │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ ├── line-and-inline-decorations │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ ├── listening-to-key-events │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ ├── listening-to-mouse-events │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ ├── rendering-glyphs-in-the-margin │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ │ └── revealing-a-position │ │ ├── sample.css │ │ ├── sample.html │ │ ├── sample.js │ │ └── sample.json │ ├── index.tsx │ ├── monaco-loader-chunk.ts │ ├── monacoEditorVersion.ts │ ├── pages │ ├── App.tsx │ ├── DocsPage.tsx │ ├── MonarchPage.tsx │ ├── home │ │ └── Home.tsx │ ├── playground │ │ ├── BisectModel.ts │ │ ├── LocationModel.ts │ │ ├── PlaygroundModel.ts │ │ ├── PlaygroundPage.tsx │ │ ├── PlaygroundPageContent.tsx │ │ ├── Preview.tsx │ │ ├── SettingsDialog.tsx │ │ ├── SettingsModel.ts │ │ ├── Source.ts │ │ ├── getNpmVersionsSync.ts │ │ ├── playgroundExamples.tsx │ │ └── utils.ts │ └── routes.ts │ ├── style.scss │ └── utils │ ├── Debouncer.ts │ ├── ObservableHistory.ts │ ├── ObservablePromise.ts │ ├── hotComponent.tsx │ ├── lzmaCompressor.ts │ ├── ref.ts │ ├── types.d.ts │ └── utils.ts ├── static ├── monarch-static.html └── monarch │ ├── monarch-34px.png │ ├── monarch.css │ └── monarch.js ├── tsconfig.json ├── tslint.json ├── typedoc ├── tsconfig.json └── typedoc.json ├── vscode-web-editors.tgz ├── webpack.config.ts └── yarn.lock /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "mcr.microsoft.com/devcontainers/typescript-node", 3 | "customizations": { 4 | "vscode": { 5 | "extensions": ["ms-vscode.js-debug-nightly"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3_other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other Request (For Maintainers Only) 3 | about: This issue template should only be used by maintainers. 4 | --- 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Question 4 | url: https://stackoverflow.com/questions/tagged/monaco-editor 5 | about: Please ask and answer questions here. 6 | -------------------------------------------------------------------------------- /.github/publish-failure-issue-template.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NPM Publishing Failed 3 | assignees: [] 4 | labels: bug 5 | --- 6 | 7 | NPM publishing failed. Check the last GitHub Action log. 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/node_modules/ 2 | **/dependencies/ 3 | /test/manual/generated/** 4 | /test/smoke/vite/dist/** 5 | /test/smoke/parcel/dist/** 6 | /test/smoke/parcel/.cache/** 7 | **/dist/ 8 | **/out/ 9 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run pretty-quick 5 | -------------------------------------------------------------------------------- /.mocharc.json: -------------------------------------------------------------------------------- 1 | { 2 | "delay": true, 3 | "ui": "tdd" 4 | } 5 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 20.14.0 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/node_modules/ 2 | **/dist/ 3 | **/out/ 4 | /samples/browser-esm-parcel/.parcel-cache/ 5 | /samples/browser-esm-parcel/dist/ 6 | /samples/browser-esm-vite-react/dist/**/*.js 7 | /samples/browser-esm-webpack/dist/*.js 8 | /samples/browser-esm-webpack-monaco-plugin/dist/*.js 9 | /samples/browser-esm-webpack-small/dist/*.js 10 | /samples/browser-esm-webpack-typescript/dist/*.js 11 | /samples/browser-esm-webpack-typescript-react/dist/*.js 12 | /src/language/typescript/lib/ 13 | /test/manual/generated/ 14 | /website/lib/ 15 | /website/typedoc/monaco.d.ts 16 | /test/smoke/vite/dist 17 | /test/smoke/parcel/dist 18 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "semi": true, 6 | "useTabs": true, 7 | "printWidth": 100 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "editor.tabSize": 4, 4 | "editor.insertSpaces": false, 5 | "files.insertFinalNewline": true, 6 | "files.trimTrailingWhitespace": true, 7 | "search.exclude": { 8 | "**/node_modules": true, 9 | "**/dist": true, 10 | "**/out": true 11 | }, 12 | "typescript.tsdk": "./node_modules/typescript/lib", 13 | "git.branchProtection": ["main", "release/*"], 14 | "git.branchProtectionPrompt": "alwaysCommitToNewBranch", 15 | "git.branchRandomName.enable": true 16 | } 17 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Launch Http Server", 6 | "type": "shell", 7 | "command": "node_modules/.bin/http-server --cors --port 5002 -a 127.0.0.1 -c-1", 8 | "isBackground": true, 9 | "problemMatcher": { 10 | "pattern": { 11 | "regexp": "does not support problems" 12 | }, 13 | "background": { 14 | "activeOnStart": true, 15 | "beginsPattern": "Shutting down http-server (will never match)", 16 | "endsPattern": "Starting up http-server" 17 | } 18 | }, 19 | "dependsOn": ["npm: watch"] 20 | }, 21 | { 22 | "type": "npm", 23 | "script": "watch", 24 | "group": "build", 25 | "problemMatcher": ["$tsc-watch"], 26 | "isBackground": true, 27 | "label": "npm: watch" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /build/npm/removeAll.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import glob from 'glob'; 7 | import path from 'path'; 8 | import fs from 'fs'; 9 | import { REPO_ROOT } from '../utils'; 10 | 11 | const files = glob.sync('**/package-lock.json', { 12 | cwd: REPO_ROOT, 13 | ignore: ['**/node_modules/**', '**/out/**'] 14 | }); 15 | 16 | for (const file of files) { 17 | const filePath = path.join(REPO_ROOT, file); 18 | console.log(`Deleting ${file}...`); 19 | fs.unlinkSync(filePath); 20 | } 21 | -------------------------------------------------------------------------------- /build/postinstall.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import cp = require('child_process'); 7 | import path = require('path'); 8 | 9 | function huskyInstall() { 10 | console.log(`Installing husky hooks...`); 11 | console.log(`$ husky install`); 12 | const result = cp.spawnSync( 13 | process.execPath, 14 | [path.join(__dirname, '../node_modules/husky/lib/bin.js'), 'install'], 15 | { stdio: 'inherit' } 16 | ); 17 | 18 | if (result.error || result.status !== 0) { 19 | process.exit(1); 20 | } 21 | } 22 | 23 | huskyInstall(); 24 | -------------------------------------------------------------------------------- /build/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "module": "CommonJS", 5 | "esModuleInterop": true 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /docs/debugging-core.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/docs/debugging-core.gif -------------------------------------------------------------------------------- /docs/debugging-languages.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/docs/debugging-languages.gif -------------------------------------------------------------------------------- /docs/integrate-amd.md: -------------------------------------------------------------------------------- 1 | ## Integrating the AMD version of the Monaco Editor 2 | 3 | Here is the most basic HTML page that embeds the editor using AMD. 4 | 5 | More self-contained samples are available in the [samples folder](../samples/). 6 | 7 | ```html 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 26 | 27 | 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/launch config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/docs/launch config.png -------------------------------------------------------------------------------- /editor.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "../vscode" 5 | }, 6 | { 7 | "path": "../vscode-loc" 8 | }, 9 | { 10 | "path": "." 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | const gulp = require('gulp'); 2 | const es = require('event-stream'); 3 | const path = require('path'); 4 | const fs = require('fs'); 5 | const rimraf = require('rimraf'); 6 | const cp = require('child_process'); 7 | const CleanCSS = require('clean-css'); 8 | const uncss = require('uncss'); 9 | const File = require('vinyl'); 10 | -------------------------------------------------------------------------------- /samples/browser-amd-editor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | browser-amd-editor 5 | 6 | 7 | 8 |

Monaco Editor Sample

9 |
10 | 11 | 12 | 13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /samples/browser-amd-localized/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor Localization Sample

8 |
9 | 10 | 11 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/browser-esm-esbuild/.gitignore: -------------------------------------------------------------------------------- 1 | dist/**/*.js 2 | dist/**/*.ttf 3 | dist/**/*.css 4 | -------------------------------------------------------------------------------- /samples/browser-esm-esbuild/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/browser-esm-esbuild/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor esbuild Bundler Sample

8 | 9 | To run this sample, you need to: 10 | 11 |
12 | $/browser-esm-esbuild> npm run build
13 | 
15 | 16 | Then, open the ./dist folder. 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/browser-esm-esbuild/index.js: -------------------------------------------------------------------------------- 1 | import * as monaco from 'monaco-editor/esm/vs/editor/editor.main.js'; 2 | 3 | self.MonacoEnvironment = { 4 | getWorkerUrl: function (moduleId, label) { 5 | if (label === 'json') { 6 | return './vs/language/json/json.worker.js'; 7 | } 8 | if (label === 'css' || label === 'scss' || label === 'less') { 9 | return './vs/language/css/css.worker.js'; 10 | } 11 | if (label === 'html' || label === 'handlebars' || label === 'razor') { 12 | return './vs/language/html/html.worker.js'; 13 | } 14 | if (label === 'typescript' || label === 'javascript') { 15 | return './vs/language/typescript/ts.worker.js'; 16 | } 17 | return './vs/editor/editor.worker.js'; 18 | } 19 | }; 20 | 21 | monaco.editor.create(document.getElementById('container'), { 22 | value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), 23 | language: 'javascript' 24 | }); 25 | -------------------------------------------------------------------------------- /samples/browser-esm-esbuild/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "helloworld", 3 | "scripts": { 4 | "build": "node ./build.js" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /samples/browser-esm-parcel/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | .parcel-cache 3 | -------------------------------------------------------------------------------- /samples/browser-esm-parcel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor Parcel Bundler Sample

8 | 9 | To run this sample, you need to: 10 | 11 |
12 | $/browser-esm-parcel> npm install .
13 | $/browser-esm-parcel> npm start
14 | 
16 | 17 | Then, open http://localhost:9999/. 18 | 19 | 20 | -------------------------------------------------------------------------------- /samples/browser-esm-parcel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "helloworld", 3 | "scripts": { 4 | "start": "parcel ./src/index.html" 5 | }, 6 | "devDependencies": { 7 | "monaco-editor": "^0.32.0", 8 | "parcel": "^2.2.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/browser-esm-parcel/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | src/**/*.js 3 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | browser-esm-vite-react 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browser-esm-vite-react", 3 | "scripts": { 4 | "dev": "vite", 5 | "build": "tsc && vite build", 6 | "serve": "vite preview", 7 | "simpleserver": "node ../node_modules/yaserver/bin/yaserver --root ./dist --port 9999" 8 | }, 9 | "dependencies": {}, 10 | "devDependencies": { 11 | "monaco-editor": "^0.32.0", 12 | "react": "^17.0.2", 13 | "react-dom": "^17.0.2", 14 | "@types/react": "^17.0.39", 15 | "@types/react-dom": "^17.0.11", 16 | "@vitejs/plugin-react": "^1.1.4", 17 | "typescript": "^5.4.5", 18 | "vite": "^2.9.17" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/src/components/Editor.module.css: -------------------------------------------------------------------------------- 1 | .Editor { 2 | width: 100vw; 3 | height: 100vh; 4 | } 5 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/src/components/Editor.tsx: -------------------------------------------------------------------------------- 1 | import { VFC, useRef, useState, useEffect } from 'react'; 2 | import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; 3 | import styles from './Editor.module.css'; 4 | 5 | export const Editor: VFC = () => { 6 | const [editor, setEditor] = useState(null); 7 | const monacoEl = useRef(null); 8 | 9 | useEffect(() => { 10 | if (monacoEl) { 11 | setEditor((editor) => { 12 | if (editor) return editor; 13 | 14 | return monaco.editor.create(monacoEl.current!, { 15 | value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), 16 | language: 'typescript' 17 | }); 18 | }); 19 | } 20 | 21 | return () => editor?.dispose(); 22 | }, [monacoEl.current]); 23 | 24 | return
; 25 | }; 26 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { Editor } from './components/Editor'; 4 | import './userWorker'; 5 | 6 | ReactDOM.render( 7 | 8 | 9 | , 10 | document.getElementById('root') 11 | ); 12 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "strict": true, 5 | "module": "ESNext", 6 | "jsx": "react-jsx", 7 | "moduleResolution": "node", 8 | "allowSyntheticDefaultImports": true 9 | }, 10 | "include": ["./src"] 11 | } 12 | -------------------------------------------------------------------------------- /samples/browser-esm-vite-react/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import react from '@vitejs/plugin-react'; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()] 7 | }); 8 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-monaco-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | dist/*.js 2 | dist/*.ttf 3 | dist/*.txt 4 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-monaco-plugin/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-monaco-plugin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor Webpack Plugin Sample

8 | 9 | To run this sample, you need to: 10 | 11 |
12 | $/> npm install .
13 | $/> npm run simpleserver
14 | $/browser-esm-webpack-monaco-plugin> npm run build
15 | 
17 | 18 | Then, open the ./dist folder. 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-monaco-plugin/index.js: -------------------------------------------------------------------------------- 1 | import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; 2 | 3 | (function () { 4 | // create div to avoid needing a HtmlWebpackPlugin template 5 | const div = document.createElement('div'); 6 | div.id = 'root'; 7 | div.style = 'width:800px; height:600px; border:1px solid #ccc;'; 8 | 9 | document.body.appendChild(div); 10 | })(); 11 | 12 | monaco.editor.create(document.getElementById('root'), { 13 | value: `const foo = () => 0;`, 14 | language: 'javascript', 15 | theme: 'vs-dark' 16 | }); 17 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-monaco-plugin/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browser-esm-webpack-monaco-plugin", 3 | "scripts": { 4 | "build": "node ../node_modules/webpack/bin/webpack.js --progress" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-monaco-plugin/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); 3 | 4 | module.exports = { 5 | mode: process.env.NODE_ENV, 6 | entry: './index.js', 7 | output: { 8 | path: path.resolve(__dirname, 'dist'), 9 | filename: '[name].bundle.js' 10 | }, 11 | module: { 12 | rules: [ 13 | { 14 | test: /\.css$/, 15 | use: ['style-loader', 'css-loader'] 16 | }, 17 | { 18 | test: /\.ttf$/, 19 | use: ['file-loader'] 20 | } 21 | ] 22 | }, 23 | plugins: [ 24 | new MonacoWebpackPlugin({ 25 | languages: ['typescript', 'javascript', 'css'] 26 | }) 27 | ] 28 | }; 29 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-small/.gitignore: -------------------------------------------------------------------------------- 1 | dist/*.js 2 | dist/*.ttf 3 | dist/*.txt 4 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-small/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-small/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor Webpack Sample

8 | 9 | This sample shows how to load a small subset of the editor: 10 | 14 | 15 | To run this sample, you need to: 16 | 17 |
18 | $/> npm install .
19 | $/> npm run simpleserver
20 | $/browser-esm-webpack-small> npm run build
21 | 
23 | 24 | Then, open the ./dist folder. 25 | 26 | 27 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-small/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browser-esm-webpack-small", 3 | "scripts": { 4 | "build": "node ../node_modules/webpack/bin/webpack.js --progress", 5 | "generate-imports": "node generate-imports.js" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript-react/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | lib 3 | logs 4 | *.log 5 | npm-debug.log* 6 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "monaco-esm-webpack-typescript", 3 | "scripts": { 4 | "start": "node ../node_modules/webpack-dev-server/bin/webpack-dev-server.js", 5 | "build": "NODE_ENV='production' node ../node_modules/webpack/bin/webpack.js --progress" 6 | }, 7 | "dependencies": {}, 8 | "devDependencies": { 9 | "@babel/core": "^7.17.0", 10 | "@babel/preset-env": "^7.16.11", 11 | "@babel/preset-react": "^7.16.7", 12 | "@babel/preset-typescript": "^7.16.7", 13 | "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", 14 | "@types/react": "^17.0.39", 15 | "@types/react-dom": "^17.0.11", 16 | "babel-loader": "^8.2.3", 17 | "react": "^17.0.2", 18 | "react-dom": "^17.0.2", 19 | "react-refresh": "^0.11.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript-react/src/index.css: -------------------------------------------------------------------------------- 1 | .Editor { 2 | width: 800px; 3 | height: 600px; 4 | border: 1px solid #ccc; 5 | } 6 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript-react/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Monaco Editor Sample 6 | 7 | 8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript-react/src/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | 3 | import React from 'react'; 4 | import ReactDOM from 'react-dom'; 5 | import { Editor } from './components/Editor'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "sourceMap": true, 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "strict": true, 7 | "target": "ES6", 8 | "outDir": "./dist", 9 | "lib": ["dom", "es5", "es2015.collection", "es2015.promise"], 10 | "types": [], 11 | "baseUrl": "./node_modules", 12 | "jsx": "preserve", 13 | "esModuleInterop": true, 14 | "typeRoots": ["node_modules/@types"] 15 | }, 16 | "include": ["./src/**/*"], 17 | "exclude": ["node_modules"] 18 | } 19 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | lib 3 | logs 4 | *.log 5 | npm-debug.log* 6 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "monaco-esm-webpack-typescript", 3 | "scripts": { 4 | "start": "node ../node_modules/webpack-dev-server/bin/webpack-dev-server.js", 5 | "build": "node ../node_modules/webpack/bin/webpack.js --progress" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | width: 800px; 3 | height: 600px; 4 | border: 1px solid #ccc; 5 | } 6 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as monaco from 'monaco-editor'; 2 | import './index.css'; 3 | 4 | // @ts-ignore 5 | self.MonacoEnvironment = { 6 | getWorkerUrl: function (moduleId, label) { 7 | if (label === 'json') { 8 | return './json.worker.bundle.js'; 9 | } 10 | if (label === 'css' || label === 'scss' || label === 'less') { 11 | return './css.worker.bundle.js'; 12 | } 13 | if (label === 'html' || label === 'handlebars' || label === 'razor') { 14 | return './html.worker.bundle.js'; 15 | } 16 | if (label === 'typescript' || label === 'javascript') { 17 | return './ts.worker.bundle.js'; 18 | } 19 | return './editor.worker.bundle.js'; 20 | } 21 | }; 22 | 23 | monaco.editor.create(document.body, { 24 | value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), 25 | language: 'typescript' 26 | }); 27 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack-typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "sourceMap": true, 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "target": "es5", 7 | "outDir": "./dist", 8 | "lib": ["dom", "es5", "es2015.collection", "es2015.promise"], 9 | "types": [], 10 | "baseUrl": "./node_modules", 11 | "jsx": "preserve", 12 | "typeRoots": ["node_modules/@types"] 13 | }, 14 | "include": ["./src/**/*"], 15 | "exclude": ["node_modules"] 16 | } 17 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack/.gitignore: -------------------------------------------------------------------------------- 1 | dist/*.js 2 | dist/*.ttf 3 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor Webpack Sample

8 | 9 | To run this sample, you need to: 10 | 11 |
12 | $/> npm install .
13 | $/> npm run simpleserver
14 | $/browser-esm-webpack> npm run build
15 | 
17 | 18 | Then, open the ./dist folder. 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack/index.js: -------------------------------------------------------------------------------- 1 | import * as monaco from 'monaco-editor'; 2 | 3 | self.MonacoEnvironment = { 4 | getWorkerUrl: function (moduleId, label) { 5 | if (label === 'json') { 6 | return './json.worker.bundle.js'; 7 | } 8 | if (label === 'css' || label === 'scss' || label === 'less') { 9 | return './css.worker.bundle.js'; 10 | } 11 | if (label === 'html' || label === 'handlebars' || label === 'razor') { 12 | return './html.worker.bundle.js'; 13 | } 14 | if (label === 'typescript' || label === 'javascript') { 15 | return './ts.worker.bundle.js'; 16 | } 17 | return './editor.worker.bundle.js'; 18 | } 19 | }; 20 | 21 | monaco.editor.create(document.getElementById('container'), { 22 | value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), 23 | language: 'javascript' 24 | }); 25 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browser-esm-webpack", 3 | "scripts": { 4 | "build": "node ../node_modules/webpack/bin/webpack.js --progress" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /samples/browser-esm-webpack/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | mode: 'development', 5 | entry: { 6 | app: './index.js', 7 | 'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js', 8 | 'json.worker': 'monaco-editor/esm/vs/language/json/json.worker', 9 | 'css.worker': 'monaco-editor/esm/vs/language/css/css.worker', 10 | 'html.worker': 'monaco-editor/esm/vs/language/html/html.worker', 11 | 'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker' 12 | }, 13 | output: { 14 | globalObject: 'self', 15 | filename: '[name].bundle.js', 16 | path: path.resolve(__dirname, 'dist') 17 | }, 18 | module: { 19 | rules: [ 20 | { 21 | test: /\.css$/, 22 | use: ['style-loader', 'css-loader'] 23 | }, 24 | { 25 | test: /\.ttf$/, 26 | use: ['file-loader'] 27 | } 28 | ] 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /samples/electron-amd-nodeIntegration/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor Electron Sample

8 | 9 | To run this sample, you need to 10 | download Electron 11 | and then execute: 12 | 13 |
14 | $/electron-amd> electron main.js
15 | 
17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/electron-amd-nodeIntegration/main.js: -------------------------------------------------------------------------------- 1 | const electron = require('electron'); 2 | const app = electron.app; 3 | const BrowserWindow = electron.BrowserWindow; 4 | 5 | let mainWindow; 6 | 7 | function createWindow() { 8 | mainWindow = new BrowserWindow({ 9 | width: 800, 10 | height: 600, 11 | webPreferences: { 12 | nodeIntegration: true, 13 | worldSafeExecuteJavaScript: true, 14 | sandbox: false, 15 | contextIsolation: false 16 | } 17 | }); 18 | mainWindow.loadURL(`file://${__dirname}/electron-index.html`); 19 | mainWindow.webContents.openDevTools(); 20 | mainWindow.on('closed', function () { 21 | mainWindow = null; 22 | }); 23 | } 24 | 25 | app.on('ready', createWindow); 26 | 27 | app.on('window-all-closed', function () { 28 | if (process.platform !== 'darwin') { 29 | app.quit(); 30 | } 31 | }); 32 | 33 | app.on('activate', function () { 34 | if (mainWindow === null) { 35 | createWindow(); 36 | } 37 | }); 38 | -------------------------------------------------------------------------------- /samples/electron-amd-nodeIntegration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-amd-node-integration", 3 | "scripts": { 4 | "execute": "node ../node_modules/electron/cli.js ." 5 | }, 6 | "main": "./main" 7 | } 8 | -------------------------------------------------------------------------------- /samples/electron-amd/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor Electron Sample

8 | 9 | To run this sample, you need to 10 | download Electron 11 | and then execute: 12 | 13 |
14 | $/electron-amd> electron main.js
15 | 
17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/electron-amd/main.js: -------------------------------------------------------------------------------- 1 | const electron = require('electron'); 2 | const app = electron.app; 3 | const BrowserWindow = electron.BrowserWindow; 4 | 5 | let mainWindow; 6 | 7 | function createWindow() { 8 | mainWindow = new BrowserWindow({ 9 | width: 800, 10 | height: 600, 11 | webPreferences: { worldSafeExecuteJavaScript: true } 12 | }); 13 | mainWindow.loadURL(`file://${__dirname}/electron-index.html`); 14 | mainWindow.webContents.openDevTools(); 15 | mainWindow.on('closed', function () { 16 | mainWindow = null; 17 | }); 18 | } 19 | 20 | app.on('ready', createWindow); 21 | 22 | app.on('window-all-closed', function () { 23 | if (process.platform !== 'darwin') { 24 | app.quit(); 25 | } 26 | }); 27 | 28 | app.on('activate', function () { 29 | if (mainWindow === null) { 30 | createWindow(); 31 | } 32 | }); 33 | -------------------------------------------------------------------------------- /samples/electron-amd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-amd", 3 | "scripts": { 4 | "execute": "node ../node_modules/electron/cli.js ." 5 | }, 6 | "main": "./main" 7 | } 8 | -------------------------------------------------------------------------------- /samples/electron-esm-webpack/.gitignore: -------------------------------------------------------------------------------- 1 | dist/*.js 2 | dist/*.txt 3 | dist/*.ttf 4 | -------------------------------------------------------------------------------- /samples/electron-esm-webpack/dist/electron-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | Monaco Editor! 10 | 17 | 18 | 19 | 20 |

Monaco Editor in Electron (without nodeIntegration)!

21 | Note: Since Electron without nodeIntegration is very similar to a browser, you can have a look 22 | at all the other `browser-` samples, as they should work just fine.

23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /samples/electron-esm-webpack/index.js: -------------------------------------------------------------------------------- 1 | import * as monaco from 'monaco-editor'; 2 | 3 | self.MonacoEnvironment = { 4 | getWorkerUrl: function (moduleId, label) { 5 | if (label === 'json') { 6 | return './json.worker.bundle.js'; 7 | } 8 | if (label === 'css' || label === 'scss' || label === 'less') { 9 | return './css.worker.bundle.js'; 10 | } 11 | if (label === 'html' || label === 'handlebars' || label === 'razor') { 12 | return './html.worker.bundle.js'; 13 | } 14 | if (label === 'typescript' || label === 'javascript') { 15 | return './ts.worker.bundle.js'; 16 | } 17 | return './editor.worker.bundle.js'; 18 | } 19 | }; 20 | 21 | monaco.editor.create(document.getElementById('container'), { 22 | value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), 23 | language: 'javascript' 24 | }); 25 | -------------------------------------------------------------------------------- /samples/electron-esm-webpack/main.js: -------------------------------------------------------------------------------- 1 | const electron = require('electron'); 2 | const app = electron.app; 3 | const BrowserWindow = electron.BrowserWindow; 4 | 5 | let mainWindow; 6 | 7 | function createWindow() { 8 | mainWindow = new BrowserWindow({ 9 | width: 800, 10 | height: 600, 11 | webPreferences: { worldSafeExecuteJavaScript: true } 12 | }); 13 | mainWindow.loadURL(`file://${__dirname}/dist/electron-index.html`); 14 | mainWindow.webContents.openDevTools(); 15 | mainWindow.on('closed', function () { 16 | mainWindow = null; 17 | }); 18 | } 19 | 20 | app.on('ready', createWindow); 21 | 22 | app.on('window-all-closed', function () { 23 | if (process.platform !== 'darwin') { 24 | app.quit(); 25 | } 26 | }); 27 | 28 | app.on('activate', function () { 29 | if (mainWindow === null) { 30 | createWindow(); 31 | } 32 | }); 33 | -------------------------------------------------------------------------------- /samples/electron-esm-webpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-esm-webpack", 3 | "main": "./main", 4 | "scripts": { 5 | "build": "node ../node_modules/webpack/bin/webpack.js --progress", 6 | "execute": "node ../node_modules/electron/cli.js ." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /samples/electron-esm-webpack/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: { 5 | app: './index.js', 6 | 'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js', 7 | 'json.worker': 'monaco-editor/esm/vs/language/json/json.worker', 8 | 'css.worker': 'monaco-editor/esm/vs/language/css/css.worker', 9 | 'html.worker': 'monaco-editor/esm/vs/language/html/html.worker', 10 | 'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker' 11 | }, 12 | output: { 13 | globalObject: 'self', 14 | filename: '[name].bundle.js', 15 | path: path.resolve(__dirname, 'dist') 16 | }, 17 | module: { 18 | rules: [ 19 | { 20 | test: /\.css$/, 21 | use: ['style-loader', 'css-loader'] 22 | }, 23 | { 24 | test: /\.ttf$/, 25 | use: ['file-loader'] 26 | } 27 | ] 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /samples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "monaco-editor-samples", 3 | "version": "0.0.1", 4 | "private": true, 5 | "description": "Samples for using the Monaco Editor", 6 | "main": "index.js", 7 | "scripts": { 8 | "simpleserver": "yaserver --root ./ --port 8888" 9 | }, 10 | "author": "Microsoft Corporation", 11 | "license": "MIT", 12 | "devDependencies": { 13 | "css-loader": "^5.2.7", 14 | "electron": "^22.3.25", 15 | "file-loader": "^6.2.0", 16 | "glob": "^7.2.0", 17 | "html-webpack-plugin": "^5.5.0", 18 | "monaco-editor-webpack-plugin": "^7.0.1", 19 | "monaco-editor": "^0.32.1", 20 | "style-loader": "^3.3.1", 21 | "terser-webpack-plugin": "^5.3.1", 22 | "ts-loader": "^9.2.6", 23 | "typescript": "^5.4.5", 24 | "webpack-cli": "^4.9.2", 25 | "webpack-dev-server": "^4.7.4", 26 | "webpack": "^5.76.0", 27 | "yaserver": "^0.4.0" 28 | }, 29 | "overrides": { 30 | "@electron/get": "2.0.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /scripts/ci/env.ts: -------------------------------------------------------------------------------- 1 | interface Env { 2 | VSCODE_REF: string; 3 | PRERELEASE_VERSION: string; 4 | } 5 | 6 | export function getNightlyEnv(): Env { 7 | const env: Env = process.env as any; 8 | if (!env.PRERELEASE_VERSION) { 9 | throw new Error(`Missing PRERELEASE_VERSION in process.env`); 10 | } 11 | if (!env.VSCODE_REF) { 12 | throw new Error(`Missing VSCODE_REF in process.env`); 13 | } 14 | return env; 15 | } 16 | -------------------------------------------------------------------------------- /scripts/ci/monaco-editor-core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # cwd must be the vscode repository. 5 | 6 | yarn --frozen-lockfile --network-timeout 180000 7 | yarn playwright-install 8 | yarn gulp hygiene 9 | yarn valid-layers-check 10 | yarn --cwd build compile 11 | yarn eslint 12 | yarn monaco-compile-check 13 | yarn --max_old_space_size=4095 compile 14 | 15 | yarn test-browser --browser chromium 16 | 17 | yarn gulp editor-distro 18 | mkdir typings-test 19 | 20 | cd typings-test 21 | yarn init -yp 22 | ../node_modules/.bin/tsc --init 23 | echo "import '../out-monaco-editor-core';" > a.ts 24 | ../node_modules/.bin/tsc --noEmit 25 | cd .. 26 | 27 | cd test/monaco 28 | yarn run esm-check 29 | yarn run bundle-webpack 30 | yarn run compile 31 | yarn test 32 | cd ../.. 33 | 34 | # npm package is now in dependencies/vscode/out-monaco-editor-core, ready to be published 35 | -------------------------------------------------------------------------------- /scripts/ci/monaco-editor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Install OS Dependencies for Playwright 5 | sudo npm run playwright-install-deps 6 | # Check prettier 7 | npm run prettier-check 8 | # Build 9 | npm run build-monaco-editor 10 | 11 | # Run unit tests 12 | npm test 13 | 14 | # Compile webpack plugin 15 | npm run compile --prefix webpack-plugin 16 | # Package using webpack plugin 17 | npm run package-for-smoketest-webpack 18 | # Package using esbuild 19 | npm run package-for-smoketest-esbuild 20 | # Package using vite 21 | npm run package-for-smoketest-vite 22 | # Package using parcel 23 | # npm run package-for-smoketest-parcel --prefix test/smoke/parcel 24 | # Disabled for now, as the parcel bundler cannot deal with VS Code process variable 25 | 26 | # Run smoke test 27 | npm run smoketest 28 | 29 | # npm package is now ready to be published in ./out/monaco-editor 30 | -------------------------------------------------------------------------------- /src/basic-languages/abap/abap.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'abap', 13 | extensions: ['.abap'], 14 | aliases: ['abap', 'ABAP'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/abap/abap'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./abap'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/apex/apex.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'apex', 13 | extensions: ['.cls'], 14 | aliases: ['Apex', 'apex'], 15 | mimetypes: ['text/x-apex-source', 'text/x-apex'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/apex/apex'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./apex'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/azcli/azcli.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'azcli', 13 | extensions: ['.azcli'], 14 | aliases: ['Azure CLI', 'azcli'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/azcli/azcli'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./azcli'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/bat/bat.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'bat', 13 | extensions: ['.bat', '.cmd'], 14 | aliases: ['Batch', 'bat'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/bat/bat'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./bat'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/bicep/bicep.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'bicep', 13 | extensions: ['.bicep'], 14 | aliases: ['Bicep'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/bicep/bicep'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./bicep'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/cameligo/cameligo.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'cameligo', 13 | extensions: ['.mligo'], 14 | aliases: ['Cameligo'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/cameligo/cameligo'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./cameligo'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/clojure/clojure.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'clojure', 13 | extensions: ['.clj', '.cljs', '.cljc', '.edn'], 14 | aliases: ['clojure', 'Clojure'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/clojure/clojure'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./clojure'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/csharp/csharp.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'csharp', 13 | extensions: ['.cs', '.csx', '.cake'], 14 | aliases: ['C#', 'csharp'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/csharp/csharp'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./csharp'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/csp/csp.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'csp', 13 | extensions: ['.csp'], 14 | aliases: ['CSP', 'csp'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/csp/csp'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./csp'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/csp/csp.test.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { testTokenization } from '../test/testRunner'; 7 | 8 | testTokenization('csp', []); 9 | -------------------------------------------------------------------------------- /src/basic-languages/css/css.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'css', 13 | extensions: ['.css'], 14 | aliases: ['CSS', 'css'], 15 | mimetypes: ['text/css'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/css/css'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./css'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/cypher/cypher.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'cypher', 13 | extensions: ['.cypher', '.cyp'], 14 | aliases: ['Cypher', 'OpenCypher'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/cypher/cypher'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./cypher'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/dart/dart.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'dart', 13 | extensions: ['.dart'], 14 | aliases: ['Dart', 'dart'], 15 | mimetypes: ['text/x-dart-source', 'text/x-dart'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/dart/dart'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./dart'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/dockerfile/dockerfile.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'dockerfile', 13 | extensions: ['.dockerfile'], 14 | filenames: ['Dockerfile'], 15 | aliases: ['Dockerfile'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/dockerfile/dockerfile'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./dockerfile'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/ecl/ecl.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'ecl', 13 | extensions: ['.ecl'], 14 | aliases: ['ECL', 'Ecl', 'ecl'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/ecl/ecl'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./ecl'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/ecl/ecl.test.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { testTokenization } from '../test/testRunner'; 7 | 8 | testTokenization('ecl', []); 9 | -------------------------------------------------------------------------------- /src/basic-languages/elixir/elixir.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'elixir', 13 | extensions: ['.ex', '.exs'], 14 | aliases: ['Elixir', 'elixir', 'ex'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/elixir/elixir'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./elixir'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/flow9/flow9.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'flow9', 13 | extensions: ['.flow'], 14 | aliases: ['Flow9', 'Flow', 'flow9', 'flow'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/flow9/flow9'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./flow9'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/fsharp/fsharp.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'fsharp', 13 | extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'], 14 | aliases: ['F#', 'FSharp', 'fsharp'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/fsharp/fsharp'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./fsharp'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/go/go.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'go', 13 | extensions: ['.go'], 14 | aliases: ['Go'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/go/go'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./go'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/graphql/graphql.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'graphql', 13 | extensions: ['.graphql', '.gql'], 14 | aliases: ['GraphQL', 'graphql', 'gql'], 15 | mimetypes: ['application/graphql'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/graphql/graphql'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./graphql'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/hcl/hcl.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'hcl', 13 | extensions: ['.tf', '.tfvars', '.hcl'], 14 | aliases: ['Terraform', 'tf', 'HCL', 'hcl'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/hcl/hcl'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./hcl'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/java/java.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'java', 13 | extensions: ['.java', '.jav'], 14 | aliases: ['Java', 'java'], 15 | mimetypes: ['text/x-java-source', 'text/x-java'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/java/java'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./java'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/julia/julia.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'julia', 13 | extensions: ['.jl'], 14 | aliases: ['julia', 'Julia'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/julia/julia'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./julia'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/kotlin/kotlin.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'kotlin', 13 | extensions: ['.kt', '.kts'], 14 | aliases: ['Kotlin', 'kotlin'], 15 | mimetypes: ['text/x-kotlin-source', 'text/x-kotlin'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/kotlin/kotlin'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./kotlin'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/less/less.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'less', 13 | extensions: ['.less'], 14 | aliases: ['Less', 'less'], 15 | mimetypes: ['text/x-less', 'text/less'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/less/less'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./less'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/lexon/lexon.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'lexon', 13 | extensions: ['.lex'], 14 | aliases: ['Lexon'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/lexon/lexon'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./lexon'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/liquid/liquid.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'liquid', 13 | extensions: ['.liquid', '.html.liquid'], 14 | aliases: ['Liquid', 'liquid'], 15 | mimetypes: ['application/liquid'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/liquid/liquid'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./liquid'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/lua/lua.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'lua', 13 | extensions: ['.lua'], 14 | aliases: ['Lua', 'lua'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/lua/lua'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./lua'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/m3/m3.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'm3', 13 | extensions: ['.m3', '.i3', '.mg', '.ig'], 14 | aliases: ['Modula-3', 'Modula3', 'modula3', 'm3'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/m3/m3'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./m3'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/mdx/mdx.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'mdx', 13 | extensions: ['.mdx'], 14 | aliases: ['MDX', 'mdx'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/mdx/mdx'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./mdx'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/mips/mips.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'mips', 13 | extensions: ['.s'], 14 | aliases: ['MIPS', 'MIPS-V'], 15 | mimetypes: ['text/x-mips', 'text/mips', 'text/plaintext'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/mips/mips'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./mips'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/msdax/msdax.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'msdax', 13 | extensions: ['.dax', '.msdax'], 14 | aliases: ['DAX', 'MSDAX'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/msdax/msdax'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./msdax'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/mysql/mysql.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'mysql', 13 | extensions: [], 14 | aliases: ['MySQL', 'mysql'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/mysql/mysql'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./mysql'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/objective-c/objective-c.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'objective-c', 13 | extensions: ['.m'], 14 | aliases: ['Objective-C'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/objective-c/objective-c'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./objective-c'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/pascal/pascal.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'pascal', 13 | extensions: ['.pas', '.p', '.pp'], 14 | aliases: ['Pascal', 'pas'], 15 | mimetypes: ['text/x-pascal-source', 'text/x-pascal'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/pascal/pascal'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./pascal'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/pascaligo/pascaligo.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'pascaligo', 13 | extensions: ['.ligo'], 14 | aliases: ['Pascaligo', 'ligo'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/pascaligo/pascaligo'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./pascaligo'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/perl/perl.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'perl', 13 | extensions: ['.pl', '.pm'], 14 | aliases: ['Perl', 'pl'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/perl/perl'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./perl'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/pgsql/pgsql.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'pgsql', 13 | extensions: [], 14 | aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/pgsql/pgsql'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./pgsql'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/php/php.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'php', 13 | extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'], 14 | aliases: ['PHP', 'php'], 15 | mimetypes: ['application/x-php'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/php/php'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./php'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/pla/pla.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'pla', 13 | extensions: ['.pla'], 14 | loader: () => { 15 | if (AMD) { 16 | return new Promise((resolve, reject) => { 17 | require(['vs/basic-languages/pla/pla'], resolve, reject); 18 | }); 19 | } else { 20 | return import('./pla'); 21 | } 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /src/basic-languages/postiats/postiats.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'postiats', 13 | extensions: ['.dats', '.sats', '.hats'], 14 | aliases: ['ATS', 'ATS/Postiats'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/postiats/postiats'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./postiats'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/powerquery/powerquery.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'powerquery', 13 | extensions: ['.pq', '.pqm'], 14 | aliases: ['PQ', 'M', 'Power Query', 'Power Query M'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/powerquery/powerquery'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./powerquery'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/powershell/powershell.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'powershell', 13 | extensions: ['.ps1', '.psm1', '.psd1'], 14 | aliases: ['PowerShell', 'powershell', 'ps', 'ps1'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/powershell/powershell'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./powershell'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/protobuf/protobuf.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'proto', 13 | extensions: ['.proto'], 14 | aliases: ['protobuf', 'Protocol Buffers'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/protobuf/protobuf'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./protobuf'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/pug/pug.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'pug', 13 | extensions: ['.jade', '.pug'], 14 | aliases: ['Pug', 'Jade', 'jade'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/pug/pug'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./pug'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/qsharp/qsharp.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'qsharp', 13 | extensions: ['.qs'], 14 | aliases: ['Q#', 'qsharp'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/qsharp/qsharp'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./qsharp'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/r/r.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'r', 13 | extensions: ['.r', '.rhistory', '.rmd', '.rprofile', '.rt'], 14 | aliases: ['R', 'r'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/r/r'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./r'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/razor/razor.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'razor', 13 | extensions: ['.cshtml'], 14 | aliases: ['Razor', 'razor'], 15 | mimetypes: ['text/x-cshtml'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/razor/razor'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./razor'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/redis/redis.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'redis', 13 | extensions: ['.redis'], 14 | aliases: ['redis'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/redis/redis'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./redis'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/redshift/redshift.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'redshift', 13 | extensions: [], 14 | aliases: ['Redshift', 'redshift'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/redshift/redshift'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./redshift'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/restructuredtext/restructuredtext.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'restructuredtext', 13 | extensions: ['.rst'], 14 | aliases: ['reStructuredText', 'restructuredtext'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/restructuredtext/restructuredtext'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./restructuredtext'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/ruby/ruby.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'ruby', 13 | extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'], 14 | filenames: ['rakefile', 'Gemfile'], 15 | aliases: ['Ruby', 'rb'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/ruby/ruby'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./ruby'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/rust/rust.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'rust', 13 | extensions: ['.rs', '.rlib'], 14 | aliases: ['Rust', 'rust'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/rust/rust'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./rust'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/sb/sb.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'sb', 13 | extensions: ['.sb'], 14 | aliases: ['Small Basic', 'sb'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/sb/sb'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./sb'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/scheme/scheme.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'scheme', 13 | extensions: ['.scm', '.ss', '.sch', '.rkt'], 14 | aliases: ['scheme', 'Scheme'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/scheme/scheme'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./scheme'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/scss/scss.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'scss', 13 | extensions: ['.scss'], 14 | aliases: ['Sass', 'sass', 'scss'], 15 | mimetypes: ['text/x-scss', 'text/scss'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/scss/scss'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./scss'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/shell/shell.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'shell', 13 | extensions: ['.sh', '.bash'], 14 | aliases: ['Shell', 'sh'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/shell/shell'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./shell'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/solidity/solidity.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'sol', 13 | extensions: ['.sol'], 14 | aliases: ['sol', 'solidity', 'Solidity'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/solidity/solidity'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./solidity'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/sophia/sophia.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'aes', 13 | extensions: ['.aes'], 14 | aliases: ['aes', 'sophia', 'Sophia'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/sophia/sophia'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./sophia'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/sparql/sparql.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'sparql', 13 | extensions: ['.rq'], 14 | aliases: ['sparql', 'SPARQL'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/sparql/sparql'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./sparql'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/sql/sql.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'sql', 13 | extensions: ['.sql'], 14 | aliases: ['SQL'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/sql/sql'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./sql'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/st/st.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'st', 13 | extensions: ['.st', '.iecst', '.iecplc', '.lc3lib', '.TcPOU', '.TcDUT', '.TcGVL', '.TcIO'], 14 | aliases: ['StructuredText', 'scl', 'stl'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/st/st'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./st'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/swift/swift.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'swift', 13 | aliases: ['Swift', 'swift'], 14 | extensions: ['.swift'], 15 | mimetypes: ['text/swift'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/swift/swift'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./swift'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/tcl/tcl.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'tcl', 13 | extensions: ['.tcl'], 14 | aliases: ['tcl', 'Tcl', 'tcltk', 'TclTk', 'tcl/tk', 'Tcl/Tk'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/tcl/tcl'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./tcl'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/twig/twig.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'twig', 13 | extensions: ['.twig'], 14 | aliases: ['Twig', 'twig'], 15 | mimetypes: ['text/x-twig'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/twig/twig'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./twig'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/basic-languages/typespec/typespec.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'typespec', 13 | extensions: ['.tsp'], 14 | aliases: ['TypeSpec'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/typespec/typespec'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./typespec'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/vb/vb.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'vb', 13 | extensions: ['.vb'], 14 | aliases: ['Visual Basic', 'vb'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/vb/vb'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./vb'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/wgsl/wgsl.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'wgsl', 13 | extensions: ['.wgsl'], 14 | aliases: ['WebGPU Shading Language', 'WGSL', 'wgsl'], 15 | loader: () => { 16 | if (AMD) { 17 | return new Promise((resolve, reject) => { 18 | require(['vs/basic-languages/wgsl/wgsl'], resolve, reject); 19 | }); 20 | } else { 21 | return import('./wgsl'); 22 | } 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /src/basic-languages/yaml/yaml.contribution.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { registerLanguage } from '../_.contribution'; 7 | 8 | declare var AMD: any; 9 | declare var require: any; 10 | 11 | registerLanguage({ 12 | id: 'yaml', 13 | extensions: ['.yaml', '.yml'], 14 | aliases: ['YAML', 'yaml', 'YML', 'yml'], 15 | mimetypes: ['application/x-yaml', 'text/x-yaml'], 16 | loader: () => { 17 | if (AMD) { 18 | return new Promise((resolve, reject) => { 19 | require(['vs/basic-languages/yaml/yaml'], resolve, reject); 20 | }); 21 | } else { 22 | return import('./yaml'); 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /src/fillers/editor.api.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'vs/editor/editor.api' { 2 | const x: any; 3 | export = x; 4 | } 5 | -------------------------------------------------------------------------------- /src/fillers/monaco-editor-core-amd.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | // Resolves with the global monaco API 7 | 8 | /// 9 | import * as api from 'vs/editor/editor.api'; 10 | 11 | export = api; 12 | -------------------------------------------------------------------------------- /src/fillers/monaco-editor-core.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | export * from 'monaco-editor-core'; 7 | -------------------------------------------------------------------------------- /src/language/css/css.worker.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker'; 7 | import { CSSWorker } from './cssWorker'; 8 | 9 | self.onmessage = () => { 10 | // ignore the first message 11 | worker.initialize((ctx, createData) => { 12 | return new CSSWorker(ctx, createData); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /src/language/html/html.worker.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker'; 7 | import { HTMLWorker } from './htmlWorker'; 8 | 9 | self.onmessage = () => { 10 | // ignore the first message 11 | worker.initialize((ctx, createData) => { 12 | return new HTMLWorker(ctx, createData); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /src/language/json/json.worker.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker'; 7 | import { JSONWorker } from './jsonWorker'; 8 | 9 | self.onmessage = () => { 10 | // ignore the first message 11 | worker.initialize((ctx, createData) => { 12 | return new JSONWorker(ctx, createData); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /src/language/typescript/lib/editor.worker.d.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | declare module 'monaco-editor-core/esm/vs/editor/editor.worker' { 7 | export function initialize(callback: (ctx: any, createData: any) => any): void; 8 | } 9 | -------------------------------------------------------------------------------- /src/language/typescript/lib/typescriptServicesMetadata.ts: -------------------------------------------------------------------------------- 1 | // 2 | // **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript` 3 | // 4 | 5 | export const typescriptVersion = "5.4.5"; 6 | -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "lib": ["dom", "es5", "es2015.collection", "es2015.promise", "es2015.iterable"], 5 | "module": "amd", 6 | "moduleResolution": "node", 7 | "outDir": "../out/languages/amd-tsc", 8 | "strict": true, 9 | "target": "es5", 10 | "sourceMap": true, 11 | "allowJs": true, 12 | "checkJs": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/manual/cross-origin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor wrong cross origin

8 | 9 |
10 |
14 |
15 | 16 | 17 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/manual/diff.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
11 |
12 | 13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/manual/iframe-inner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
18 | 19 | 20 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/manual/iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor in iframe

8 | 9 | 10 | 11 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/manual/index.css: -------------------------------------------------------------------------------- 1 | .monaco-editor .token.custom-info { 2 | color: grey !important; 3 | } 4 | .monaco-editor .token.custom-error { 5 | color: red !important; 6 | font-weight: bold !important; 7 | font-size: 1.2em !important; 8 | } 9 | .monaco-editor .token.custom-notice { 10 | color: orange !important; 11 | } 12 | .monaco-editor .token.custom-date { 13 | color: green !important; 14 | } 15 | -------------------------------------------------------------------------------- /test/manual/mouse-fixed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Monaco Editor in fixed element

8 | 9 |
20 | 21 | 22 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /test/manual/samples/run-editor-intellisense-js.txt: -------------------------------------------------------------------------------- 1 | 2 | "use strict"; 3 | function Person(age) { 4 | if (age) { 5 | this.age = age; 6 | } 7 | } 8 | Person.prototype.getAge = function () { 9 | return this.age; 10 | }; 11 | 12 | function Student(age, grade) { 13 | Person.call(this, age); 14 | this.grade = grade; 15 | } 16 | Student.prototype = new Person(); 17 | Student.prototype.getGrade = function () { 18 | return this.grade; 19 | }; 20 | 21 | var s = new Student(24, 5.75); 22 | //var age = s. 23 | 24 | //delete s.age; 25 | //s.getAge = function() { return {foo:"bar"}; }; 26 | //s. 27 | //s.getAge(). 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/manual/samples/run-editor-sample-cr-ps1.txt: -------------------------------------------------------------------------------- 1 | 2 | # A line that ends only in CR(0x0D) and not LF (0x0A). foreach($parameterSet in $ObjInfoArray) 3 | { 4 | # This line also ends only in CR(0x0D) and not LF (0x0A). if ($parameterSet["class"] -eq "blank") 5 | { 6 | if ($XenCenterNodeSelected) 7 | { 8 | continue 9 | } 10 | $XenCenterNodeSelected = 1; $SelectedObjectNames += "XenCenter" 11 | } 12 | } -------------------------------------------------------------------------------- /test/manual/samples/run-editor-sample-html.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | HTML Sample 8 | 15 | 18 | 19 | 20 |

Heading No.1

21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/manual/transform.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 17 |
18 | 19 | 20 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/smoke/amd/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/smoke/common.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* keeping TS happy */ 7 | exports.__nothing = undefined; 8 | 9 | /** @typedef {'chromium'|'firefox'|'webkit'} BrowserKind */ 10 | /** @typedef {'amd'|'webpack'|'esbuild'|'vite'|'parcel'} PackagerKind */ 11 | /** @typedef {{browser:BrowserKind; packager:PackagerKind; debugTests:boolean; port:number;}} TestInfo */ 12 | -------------------------------------------------------------------------------- /test/smoke/esbuild/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/smoke/package-vite.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as vite from 'vite'; 7 | import * as path from 'path'; 8 | 9 | async function main() { 10 | await vite.build({ 11 | root: path.resolve(__dirname, './vite/'), 12 | base: '/test/smoke/vite/dist/', 13 | build: { 14 | minify: false 15 | } 16 | }); 17 | } 18 | 19 | main(); 20 | -------------------------------------------------------------------------------- /test/smoke/parcel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/smoke/parcel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parcel-smoketest", 3 | "scripts": { 4 | "package-for-smoketest-parcel": "parcel build ./index.html --cache-dir ./.cache --public-url /test/smoke/parcel/dist/ --no-optimize" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/smoke/vite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/smoke/webpack/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/smoke/webpack/index.js: -------------------------------------------------------------------------------- 1 | import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; 2 | 3 | // expose the monaco API as a global for tests 4 | window.monacoAPI = monaco; 5 | -------------------------------------------------------------------------------- /test/unit/setup.js: -------------------------------------------------------------------------------- 1 | define('vs/css', [], { 2 | load: function (name, req, load) { 3 | load({}); 4 | } 5 | }); 6 | 7 | define('vs/nls', [], { 8 | create: function () { 9 | return { 10 | localize: function () { 11 | return 'NO_LOCALIZATION_FOR_YOU'; 12 | }, 13 | localize2: function () { 14 | return 'NO_LOCALIZATION_FOR_YOU'; 15 | }, 16 | getConfiguredDefaultLocale: function () { 17 | return undefined; 18 | } 19 | }; 20 | }, 21 | localize: function () { 22 | return 'NO_LOCALIZATION_FOR_YOU'; 23 | }, 24 | localize2: function (key, message) { 25 | return { value: 'NO_LOCALIZATION_FOR_YOU', original: message }; 26 | }, 27 | load: function (name, req, load) { 28 | load({}); 29 | } 30 | }); 31 | 32 | define(['vs/editor/editor.main'], function (api) { 33 | global.monaco = api; 34 | }); 35 | -------------------------------------------------------------------------------- /webpack-plugin/.npmignore: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | /src/ 3 | /smoketest/ 4 | -------------------------------------------------------------------------------- /webpack-plugin/src/loader-utils.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'loader-utils' { 2 | export function interpolateName(loaderContext: any, name: string, options?: any): string; 3 | 4 | export function stringifyRequest(loaderContext: any, resource: string): string; 5 | } 6 | -------------------------------------------------------------------------------- /webpack-plugin/src/types.ts: -------------------------------------------------------------------------------- 1 | export interface IWorkerDefinition { 2 | id: string; 3 | entry: string; 4 | } 5 | 6 | export interface IFeatureDefinition { 7 | label: string; 8 | entry: string | string[] | undefined; 9 | worker?: IWorkerDefinition; 10 | } 11 | -------------------------------------------------------------------------------- /webpack-plugin/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "outDir": "out", 5 | "target": "es6", 6 | "declaration": true, 7 | "strict": true 8 | }, 9 | "include": ["src"], 10 | "exclude": ["node_modules"] 11 | } 12 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | *.pid.lock 11 | 12 | # Directory for instrumented libs generated by jscoverage/JSCover 13 | lib-cov 14 | 15 | # Coverage directory used by tools like istanbul 16 | coverage 17 | 18 | # nyc test coverage 19 | .nyc_output 20 | 21 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 22 | .grunt 23 | 24 | # node-waf configuration 25 | .lock-wscript 26 | 27 | # Compiled binary addons (http://nodejs.org/api/addons.html) 28 | build/Release 29 | 30 | # Dependency directories 31 | node_modules 32 | jspm_packages 33 | 34 | # Optional npm cache directory 35 | .npm 36 | 37 | # Optional REPL history 38 | .node_repl_history 39 | 40 | dist 41 | api 42 | 43 | dist/ 44 | 45 | .npmrc 46 | 47 | .yarn/cache 48 | .yarn/unplugged 49 | .yarn/build-state.yml 50 | .yarn/install-state.gz 51 | .pnp.js 52 | -------------------------------------------------------------------------------- /website/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "tabWidth": 4, 4 | "semi": true, 5 | "useTabs": true 6 | } 7 | -------------------------------------------------------------------------------- /website/src/runner/style.scss: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | border: 0; 5 | overflow: hidden; 6 | } 7 | html, 8 | body { 9 | height: 100%; 10 | } 11 | 12 | .loader-container { 13 | width: 100%; 14 | height: 100%; 15 | display: flex; 16 | } 17 | 18 | .loader { 19 | border: 16px solid #f2f1f1; 20 | border-top: 16px solid #2c9ae3; 21 | border-radius: 50%; 22 | width: 70px; 23 | height: 70px; 24 | animation: spin 2s linear infinite; 25 | margin: auto; 26 | } 27 | 28 | @keyframes spin { 29 | 0% { 30 | transform: rotate(0deg); 31 | } 32 | 100% { 33 | transform: rotate(360deg); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /website/src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "strict": true, 7 | "outDir": "dist", 8 | "skipLibCheck": true, 9 | "rootDir": ".", 10 | "resolveJsonModule": true, 11 | "newLine": "LF", 12 | "sourceMap": true, 13 | "jsx": "react", 14 | "experimentalDecorators": true, 15 | "useDefineForClassFields": false, 16 | "noEmit": true 17 | }, 18 | "include": ["**/*", "../node_modules/monaco-editor/monaco.d.ts"] 19 | } 20 | -------------------------------------------------------------------------------- /website/src/types.d.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | declare module "lzma/src/lzma_worker" { 7 | const x: any; 8 | export = x; 9 | } 10 | declare module "base64-js" { 11 | const x: any; 12 | export = x; 13 | } 14 | -------------------------------------------------------------------------------- /website/src/website/bootstrap.scss: -------------------------------------------------------------------------------- 1 | @import "~bootstrap/scss/bootstrap"; 2 | @import "~bootstrap-icons/font/bootstrap-icons.css"; 3 | 4 | .btn-light { 5 | --bs-btn-hover-bg: undefined !important; 6 | } 7 | -------------------------------------------------------------------------------- /website/src/website/code-oss.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/src/website/components/Page.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { PageNav } from "./Nav"; 3 | 4 | export function Page(props: { children: React.ReactNode }) { 5 | return ( 6 |
7 | 8 |
{props.children}
9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /website/src/website/components/Radio.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { observer } from "mobx-react"; 3 | import { Form } from "./bootstrap"; 4 | import { IReference } from "../utils/ref"; 5 | 6 | @observer 7 | export class Radio extends React.Component<{ 8 | value: IReference; 9 | current: T; 10 | id?: string; 11 | }> { 12 | render() { 13 | const { value, current } = this.props; 14 | return ( 15 | value.set(current)} 18 | type="radio" 19 | id={this.props.id} 20 | /> 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /website/src/website/components/TextBox.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { observer } from "mobx-react"; 3 | import { Form } from "./bootstrap"; 4 | import { IReference } from "../utils/ref"; 5 | 6 | @observer 7 | export class TextBox extends React.Component<{ 8 | value: IReference; 9 | style?: React.CSSProperties; 10 | }> { 11 | render() { 12 | const { value } = this.props; 13 | return ( 14 | value.set(v.currentTarget.value)} 17 | style={this.props.style} 18 | /> 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /website/src/website/components/bootstrap.tsx: -------------------------------------------------------------------------------- 1 | import Nav from "react-bootstrap/Nav"; 2 | export { Nav }; 3 | 4 | import Navbar from "react-bootstrap/Navbar"; 5 | export { Navbar }; 6 | 7 | import Form from "react-bootstrap/Form"; 8 | export { Form }; 9 | 10 | import Stack from "react-bootstrap/Stack"; 11 | export { Stack }; 12 | 13 | import Container from "react-bootstrap/Container"; 14 | export { Container }; 15 | 16 | import NavDropdown from "react-bootstrap/NavDropdown"; 17 | export { NavDropdown }; 18 | 19 | import Modal from "react-bootstrap/Modal"; 20 | export { Modal }; 21 | 22 | import Button from "react-bootstrap/Button"; 23 | export { Button }; 24 | 25 | import ListGroup from "react-bootstrap/ListGroup"; 26 | export { ListGroup }; 27 | 28 | import Row from "react-bootstrap/Row"; 29 | export { Row }; 30 | 31 | import Col from "react-bootstrap/Col"; 32 | export { Col }; 33 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.abap.txt: -------------------------------------------------------------------------------- 1 | REPORT zrosetta_base64_encode_data. 2 | 3 | DATA: li_client TYPE REF TO if_http_client, 4 | lv_encoded TYPE string, 5 | lv_data TYPE xstring. 6 | 7 | 8 | cl_http_client=>create_by_url( 9 | EXPORTING 10 | url = 'http://rosettacode.org/favicon.ico' 11 | IMPORTING 12 | client = li_client ). 13 | 14 | li_client->send( ). 15 | li_client->receive( ). 16 | 17 | lv_data = li_client->response->get_data( ). 18 | 19 | CALL FUNCTION 'SSFC_BASE64_ENCODE' 20 | EXPORTING 21 | bindata = lv_data 22 | IMPORTING 23 | b64data = lv_encoded. 24 | 25 | WHILE strlen( lv_encoded ) > 100. 26 | WRITE: / lv_encoded(100). 27 | lv_encoded = lv_encoded+100. 28 | ENDWHILE. 29 | WRITE: / lv_encoded. 30 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.apex.txt: -------------------------------------------------------------------------------- 1 | /* Using a single database query, find all the leads in 2 | the database that have the same email address as any 3 | of the leads being inserted or updated. */ 4 | for (Lead lead : [SELECT Email FROM Lead WHERE Email IN :leadMap.KeySet()]) { 5 | Lead newLead = leadMap.get(lead.Email); 6 | newLead.Email.addError('A lead with this email address already exists.'); 7 | } 8 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.azcli.txt: -------------------------------------------------------------------------------- 1 | # Create a resource group. 2 | az group create --name myResourceGroup --location westeurope 3 | 4 | # Create a new virtual machine, this creates SSH keys if not present. 5 | az vm create --resource-group myResourceGroup --name myVM --image UbuntuLTS --generate-ssh-keys -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.bat.txt: -------------------------------------------------------------------------------- 1 | rem *******Begin Comment************** 2 | rem This program starts the superapp batch program on the network, 3 | rem directs the output to a file, and displays the file 4 | rem in Notepad. 5 | rem *******End Comment************** 6 | @echo off 7 | if exist C:\output.txt goto EMPTYEXISTS 8 | setlocal 9 | path=g:\programs\superapp;%path% 10 | call superapp>C:\output.txt 11 | endlocal 12 | :EMPTYEXISTS 13 | start notepad c:\output.txt -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.cameligo.txt: -------------------------------------------------------------------------------- 1 | type storage = int 2 | type parameter = 3 | Increment of int 4 | | Decrement of int 5 | | Reset 6 | type return = operation list * storage 7 | // Two entrypoints 8 | let add (store, delta : storage * int) : storage = store + delta 9 | let sub (store, delta : storage * int) : storage = store - delta 10 | (* Main access point that dispatches to the entrypoints according to 11 | the smart contract parameter. *) 12 | let main (action, store : parameter * storage) : return = 13 | ([] : operation list), // No operations 14 | (match action with 15 | Increment (n) -> add (store, n) 16 | | Decrement (n) -> sub (store, n) 17 | | Reset -> 0) 18 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.coffeescript.txt: -------------------------------------------------------------------------------- 1 | """ 2 | A CoffeeScript sample. 3 | """ 4 | 5 | class Vehicle 6 | constructor: (@name) => 7 | 8 | drive: () => 9 | alert "Conducting #{@name}" 10 | 11 | class Car extends Vehicle 12 | drive: () => 13 | alert "Driving #{@name}" 14 | 15 | c = new Car "Brandie" 16 | 17 | while notAtDestination() 18 | c.drive() 19 | 20 | raceVehicles = (new Car for i in [1..100]) 21 | 22 | startRace = (vehicles) -> [vehicle.drive() for vehicle in vehicles] 23 | 24 | fancyRegExp = /// 25 | (\d+) # numbers 26 | (\w*) # letters 27 | $ # the end 28 | /// 29 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.csharp.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * C# Program to Display All the Prime Numbers Between 1 to 100 3 | */ 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | 10 | namespace VS 11 | { 12 | class Program 13 | { 14 | static void Main(string[] args) 15 | { 16 | bool isPrime = true; 17 | Console.WriteLine("Prime Numbers : "); 18 | for (int i = 2; i <= 100; i++) 19 | { 20 | for (int j = 2; j <= 100; j++) 21 | { 22 | if (i != j && i % j == 0) 23 | { 24 | isPrime = false; 25 | break; 26 | } 27 | } 28 | 29 | if (isPrime) 30 | { 31 | Console.Write("\t" +i); 32 | } 33 | isPrime = true; 34 | } 35 | Console.ReadKey(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.csp.txt: -------------------------------------------------------------------------------- 1 | Content-Security-Policy: default-src 'self'; img-src *; media-src media1.com media2.com; script-src userscripts.example.com -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.cypher.txt: -------------------------------------------------------------------------------- 1 | MATCH (nicole:Actor {name: 'Nicole Kidman'})-[:ACTED_IN]->(movie:Movie) 2 | WHERE movie.year < $yearParameter 3 | RETURN movie 4 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.ecl.txt: -------------------------------------------------------------------------------- 1 | F0 := IMDB.File_actors; 2 | CountActors := RECORD 3 | F0.ActorName; 4 | UNSIGNED C := COUNT(GROUP); 5 | END; 6 | MoviesIn := TABLE(F0,CountActors,ActorName); 7 | OUTPUT(TOPN(MoviesIn,100,-C)); 8 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.flow9.txt: -------------------------------------------------------------------------------- 1 | import material/material; 2 | 3 | export { 4 | demoMakeHelloWorld(onClose : () -> void) -> Material; 5 | } 6 | 7 | demoMakeHelloWorld(onClose : () -> void) -> Material { 8 | MCenter( 9 | MLines2( 10 | MText("Hello, world!", []), 11 | MTextButton("CLOSE", onClose, [], []) 12 | ) 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.fsharp.txt: -------------------------------------------------------------------------------- 1 | (* Sample F# application *) 2 | [] 3 | let main argv = 4 | printfn "%A" argv 5 | System.Console.WriteLine("Hello from F#") 6 | 0 // return an integer exit code 7 | 8 | //-------------------------------------------------------- 9 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.handlebars.txt: -------------------------------------------------------------------------------- 1 | 2 |
3 |

{{title}}

4 | {{#if author}} 5 |

{{author.firstName}} {{author.lastName}}

6 | {{else}} 7 |

Unknown Author

8 | {{/if}} 9 | {{contentBody}} 10 |
11 | 12 | {{#unless license}} 13 |

WARNING: This entry does not have a license!

14 | {{/unless}} 15 | 16 |
17 |
    18 | {{#each footnotes}} 19 |
  • {{this}}
  • 20 | {{/each}} 21 |
22 |
23 | 24 |

Comments

25 | 26 |
27 | {{#each comments}} 28 |

{{title}}

29 |
{{body}}
30 | {{/each}} 31 |
32 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.ini.txt: -------------------------------------------------------------------------------- 1 | # Example of a .gitconfig file 2 | 3 | [core] 4 | repositoryformatversion = 0 5 | filemode = false 6 | bare = false 7 | logallrefupdates = true 8 | symlinks = false 9 | ignorecase = true 10 | hideDotFiles = dotGitOnly 11 | 12 | # Defines the master branch 13 | [branch "master"] 14 | remote = origin 15 | merge = refs/heads/master 16 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.julia.txt: -------------------------------------------------------------------------------- 1 | # good style 2 | function fixedpointmap(f; iv, tolerance=1E-7, maxiter=1000) 3 | # setup the algorithm 4 | x_old = iv 5 | normdiff = Inf 6 | iter = 1 7 | while normdiff > tolerance && iter <= maxiter 8 | x_new = f(x_old) # use the passed in map 9 | normdiff = norm(x_new - x_old) 10 | x_old = x_new 11 | iter = iter + 1 12 | end 13 | return (value = x_old, normdiff=normdiff, iter=iter) # A named tuple 14 | end 15 | 16 | # define a map and parameters 17 | p = 1.0 18 | β = 0.9 19 | f(v) = p + β * v # note that p and β are used in the function! 20 | 21 | sol = fixedpointmap(f, iv=0.8, tolerance=1.0E-8) # don't need to pass 22 | println("Fixed point = $(sol.value), and |f(x) - x| = $(sol.normdiff) in $(sol.iter)"* 23 | " iterations") 24 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.kotlin.txt: -------------------------------------------------------------------------------- 1 | const val POINTS_X_PASS: Int = 15 2 | val EZPassAccounts: MutableMap = mutableMapOf(1 to 100, 2 to 100, 3 to 100) 3 | val EZPassReport: Map = EZPassAccounts 4 | 5 | // update points credit 6 | fun updatePointsCredit(accountId: Int) { 7 | if (EZPassAccounts.containsKey(accountId)) { 8 | println("Updating $accountId...") 9 | EZPassAccounts[accountId] = EZPassAccounts.getValue(accountId) + POINTS_X_PASS 10 | } else { 11 | println("Error: Trying to update a non-existing account (id: $accountId)") 12 | } 13 | } 14 | 15 | fun accountsReport() { 16 | println("EZ-Pass report:") 17 | EZPassReport.forEach{ 18 | k, v -> println("ID $k: credit $v") 19 | } 20 | } 21 | 22 | fun main() { 23 | accountsReport() 24 | updatePointsCredit(1) 25 | updatePointsCredit(1) 26 | updatePointsCredit(5) 27 | accountsReport() 28 | } -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.lex.txt: -------------------------------------------------------------------------------- 1 | LEX Paid Escrow. 2 | LEXON: 0.2.20 3 | COMMENT: 3.f - an escrow that is controlled by a third party for a fee. 4 | 5 | “Payer” is a person. 6 | “Payee” is a person. 7 | “Arbiter” is a person. 8 | “Fee” is an amount. 9 | 10 | The Payer pays an Amount into escrow, 11 | appoints the Payee, 12 | appoints the Arbiter, 13 | and also fixes the Fee. 14 | 15 | CLAUSE: Pay Out. 16 | The Arbiter may pay from escrow the Fee to themselves, 17 | and afterwards pay the remainder of the escrow to the Payee. 18 | 19 | CLAUSE: Pay Back. 20 | The Arbiter may pay from escrow the Fee to themselves, 21 | and afterwards return the remainder of the escrow to the Payer. 22 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.lexon.txt: -------------------------------------------------------------------------------- 1 | LEX Paid Escrow. 2 | LEXON: 0.2.12 3 | COMMENT: 3.f - an escrow that is controlled by a third party for a fee. 4 | “Payer” is a person. 5 | “Payee” is a person. 6 | “Arbiter” is a person. 7 | “Fee” is an amount. 8 | The Payer pays an Amount into escrow, 9 | appoints the Payee, 10 | appoints the Arbiter, 11 | and also fixes the Fee. 12 | CLAUSE: Pay Out. 13 | The Arbiter may pay from escrow the Fee to themselves, 14 | and afterwards pay the remainder of the escrow to the Payee. 15 | CLAUSE: Pay Back. 16 | The Arbiter may pay from escrow the Fee to themselves, 17 | and afterwards return the remainder of the escrow to the Payer. 18 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.liquid.txt: -------------------------------------------------------------------------------- 1 | class Random < Liquid::Block 2 | def initialize(tag_name, markup, tokens) 3 | super 4 | @rand = markup.to_i 5 | end 6 | 7 | def render(context) 8 | value = rand(@rand) 9 | super.sub('^^^', value.to_s) # calling `super` returns the content of the block 10 | end 11 | end 12 | 13 | Liquid::Template.register_tag('random', Random) 14 | text = " {% random 5 %} you have drawn number ^^^, lucky you! {% endrandom %} " 15 | @template = Liquid::Template.parse(text) 16 | @template.render # will return "you have drawn number 1, lucky you!" in 20% of cases 17 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.lua.txt: -------------------------------------------------------------------------------- 1 | -- defines a factorial function 2 | function fact (n) 3 | if n == 0 then 4 | return 1 5 | else 6 | return n * fact(n-1) 7 | end 8 | end 9 | 10 | print("enter a number:") 11 | a = io.read("*number") -- read a number 12 | print(fact(a)) -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.m3.txt: -------------------------------------------------------------------------------- 1 | MODULE HelloWorld EXPORTS Main; 2 | FROM IO IMPORT Put; 3 | BEGIN 4 | Put("Hello World\n") 5 | END HelloWorld. 6 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.mips.txt: -------------------------------------------------------------------------------- 1 | # A[i] = A[i/2] + 1; 2 | lw $t0, 0($gp) # fetch i 3 | srl $t1, $t0, 1 # i/2 4 | sll $t1, $t1, 2 # turn i/2 into a byte offset (*4) 5 | add $t1, $gp, $t1 # &A[i/2] - 28 6 | lw $t1, 28($t1) # fetch A[i/2] 7 | addi $t1, $t1, 1 # A[i/2] + 1 8 | sll $t2, $t0, 2 # turn i into a byte offset 9 | add $t2, $t2, $gp # &A[i] - 28 10 | sw $t1, 28($t2) # A[i] = ... 11 | # A[i+1] = -1; 12 | addi $t1, $zero, -1 # -1 13 | sw $t1, 32($t2) # A[i+1] = -1 14 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.msdax.txt: -------------------------------------------------------------------------------- 1 | = CALCULATE(SUM(Sales[SalesAmount]), PREVIOUSQUARTER(Calendar[DateKey])) -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.mysql.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE shop ( 2 | article INT(4) UNSIGNED ZEROFILL DEFAULT '0000' NOT NULL, 3 | dealer CHAR(20) DEFAULT '' NOT NULL, 4 | price DOUBLE(16,2) DEFAULT '0.00' NOT NULL, 5 | PRIMARY KEY(article, dealer)); 6 | INSERT INTO shop VALUES 7 | (1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45), 8 | (3,'C',1.69),(3,'D',1.25),(4,'D',19.95); -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.pascal.txt: -------------------------------------------------------------------------------- 1 | program GreetingsNumberOfTimes; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils; 9 | 10 | var 11 | greetingsMessage: string; 12 | numberOfTimes, i: integer; 13 | 14 | begin 15 | try 16 | { TODO -oUser -cConsole Main : Insert code here } 17 | greetingsMessage := 'Hello World!'; 18 | numberOfTimes := 10; 19 | 20 | for i := 1 to numberOfTimes do 21 | begin 22 | Writeln(greetingsMessage); 23 | end; 24 | except 25 | on E: Exception do 26 | Writeln(E.ClassName, ': ', E.Message); 27 | end; 28 | end. 29 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.pascaligo.txt: -------------------------------------------------------------------------------- 1 | type storage is int 2 | type parameter is 3 | Increment of int 4 | | Decrement of int 5 | | Reset 6 | type return is list (operation) * storage 7 | // Two entrypoints 8 | function add (const store : storage; const delta : int) : storage is 9 | store + delta 10 | function sub (const store : storage; const delta : int) : storage is 11 | store - delta 12 | (* Main access point that dispatches to the entrypoints according to 13 | the smart contract parameter. *) 14 | function main (const action : parameter; const store : storage) : return is 15 | ((nil : list (operation)), // No operations 16 | case action of 17 | Increment (n) -> add (store, n) 18 | | Decrement (n) -> sub (store, n) 19 | | Reset -> 0 20 | end) 21 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.perl.txt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | use warnings; 4 | 5 | use Path::Tiny; 6 | 7 | my $dir = path('foo','bar'); # foo/bar 8 | 9 | # Iterate over the content of foo/bar 10 | my $iter = $dir->iterator; 11 | while (my $file = $iter->()) { 12 | 13 | # See if it is a directory and skip 14 | next if $file->is_dir(); 15 | 16 | # Print out the file name and path 17 | print "$file\n"; 18 | } -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.pgsql.txt: -------------------------------------------------------------------------------- 1 | BEGIN 2 | SELECT * INTO STRICT myrec FROM emp WHERE empname = myname; 3 | EXCEPTION 4 | WHEN NO_DATA_FOUND THEN 5 | RAISE EXCEPTION 'employee % not found', myname; 6 | WHEN TOO_MANY_ROWS THEN 7 | RAISE EXCEPTION 'employee % not unique', myname; 8 | END; -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.pla.txt: -------------------------------------------------------------------------------- 1 | .ob out1 out2 out3 2 | --1-- - wait 110000 3 | .ilb in1 in0 wait ack nack 4 | .symbolic state<3> state<2>;aaa bbb; # comment 5 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.powerquery.txt: -------------------------------------------------------------------------------- 1 | let 2 | Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], 3 | SplitColumnDelimiter = Table.SplitColumn(Source,"Input",Splitter.SplitTextByDelimiter(","),13), 4 | Unpivot = Table.Unpivot(SplitColumnDelimiter,{"Input.1", "Input.2", "Input.3", "Input.4", 5 | "Input.5", "Input.6", "Input.7", "Input.8", "Input.9", "Input.10", "Input.11", "Input.12" 6 | , "Input.13"},"Attribute","Value"), 7 | RemovedColumns = Table.RemoveColumns(Unpivot,{"Attribute"}), 8 | DuplicatesRemoved = Table.Distinct(RemovedColumns), 9 | GroupedRows = Table.Group(DuplicatesRemoved, {"RowID"}, {{"Count of Distinct Values" 10 | , each Table.RowCount(_), type number}}) 11 | in 12 | GroupedRows -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.proto.txt: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | import public "other.proto"; 3 | 4 | /* SearchRequest represents a search query, with pagination options to 5 | * indicate which results to include in the response. */ 6 | 7 | message SearchRequest { 8 | required string query = 1; 9 | optional int32 page_number = 2; // Which page number do we want? 10 | optional int32 result_per_page = 3; // Number of results to return per page. 11 | } 12 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.pug.txt: -------------------------------------------------------------------------------- 1 | doctype 5 2 | html(lang="en") 3 | head 4 | title= pageTitle 5 | script(type='text/javascript') 6 | if (foo) { 7 | bar() 8 | } 9 | body 10 | // Disclaimer: You will need to turn insertSpaces to true in order for the 11 | syntax highlighting to kick in properly (especially for comments) 12 | Enjoy :) 13 | h1 Pug - node template engine 14 | #container 15 | if youAreUsingPug 16 | p You are amazing 17 | else 18 | p Get on it! -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.python.txt: -------------------------------------------------------------------------------- 1 | import banana 2 | 3 | 4 | class Monkey: 5 | # Bananas the monkey can eat. 6 | capacity = 10 7 | def eat(self, n): 8 | """Make the monkey eat n bananas!""" 9 | self.capacity -= n * banana.size 10 | 11 | def feeding_frenzy(self): 12 | self.eat(9.25) 13 | return "Yum yum" 14 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.r.txt: -------------------------------------------------------------------------------- 1 | # © Microsoft. All rights reserved. 2 | 3 | #' Add together two numbers. 4 | #' 5 | #' @param x A number. 6 | #' @param y A number. 7 | #' @return The sum of \code{x} and \code{y}. 8 | #' @examples 9 | #' add(1, 1) 10 | #' add(10, 1) 11 | add <- function(x, y) { 12 | x + y 13 | } 14 | 15 | add(1, 2) 16 | add(1.0, 2.0) 17 | add(-1, -2) 18 | add(-1.0, -2.0) 19 | add(1.0e10, 2.0e10) 20 | 21 | 22 | #' Concatenate together two strings. 23 | #' 24 | #' @param x A string. 25 | #' @param y A string. 26 | #' @return The concatenated string built of \code{x} and \code{y}. 27 | #' @examples 28 | #' strcat("one", "two") 29 | strcat <- function(x, y) { 30 | paste(x, y) 31 | } 32 | 33 | paste("one", "two") 34 | paste('one', 'two') 35 | paste(NULL, NULL) 36 | paste(NA, NA) 37 | 38 | paste("multi- 39 | line", 40 | 'multi- 41 | line') 42 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.redis.txt: -------------------------------------------------------------------------------- 1 | EXISTS mykey 2 | APPEND mykey "Hello" 3 | APPEND mykey " World" 4 | GET mykey -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.redshift.txt: -------------------------------------------------------------------------------- 1 | create view tables_vw as 2 | select distinct(id) table_id 3 | ,trim(datname) db_name 4 | ,trim(nspname) schema_name 5 | ,trim(relname) table_name 6 | from stv_tbl_perm 7 | join pg_class on pg_class.oid = stv_tbl_perm.id 8 | join pg_namespace on pg_namespace.oid = relnamespace 9 | join pg_database on pg_database.oid = stv_tbl_perm.db_id; 10 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.restructuredtext.txt: -------------------------------------------------------------------------------- 1 | ================= 2 | My Project Readme 3 | ================= 4 | ------------------------- 5 | Clever subtitle goes here 6 | ------------------------- 7 | 8 | Introduction 9 | ============ 10 | 11 | This is an example reStructuredText document that starts at the very top 12 | with a title and a sub-title. There is one primary header, Introduction. 13 | There is one example subheading below. 14 | The document is just plain text so it is easily readable even before 15 | being converted to HTML, man page, PDF or other formats. 16 | 17 | Subheading 18 | ---------- 19 | 20 | The basic syntax is not that different from Markdown, but it also 21 | has many more powerful features that Markdown doesn't have. We aren't 22 | taking advantage of those yet though. 23 | 24 | - Bullet points 25 | - Are intuitive 26 | - And simple too 27 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.ruby.txt: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | #-------------------------------------------------------------------------- 4 | 5 | module Azure 6 | module Blob 7 | class Blob 8 | 9 | def initialize 10 | @properties = {} 11 | @metadata = {} 12 | yield self if block_given? 13 | end 14 | 15 | attr_accessor :name 16 | attr_accessor :snapshot 17 | attr_accessor :properties 18 | attr_accessor :metadata 19 | end 20 | end 21 | end -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.sb.txt: -------------------------------------------------------------------------------- 1 | begin: 2 | TextWindow.Write("Enter a number: ") 3 | num = TextWindow.ReadNumber() 4 | remainder = Math.Remainder(num, 2) 5 | If (remainder = 0) Then 6 | TextWindow.WriteLine("The number is Even") 7 | Else 8 | TextWindow.WriteLine("The number is Odd") 9 | EndIf 10 | Goto begin -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.scss.txt: -------------------------------------------------------------------------------- 1 | $baseFontSizeInPixels: 14; 2 | 3 | @function px2em ($font_size, $base_font_size: $baseFontSizeInPixels) { 4 | @return ($font_size / $base_font_size) + em; 5 | } 6 | 7 | h1 { 8 | font-size: px2em(36, $baseFontSizeInPixels); 9 | } 10 | h2 { 11 | font-size: px2em(28, $baseFontSizeInPixels); 12 | } 13 | .class { 14 | font-size: px2em(14, $baseFontSizeInPixels); 15 | } 16 | 17 | nav { 18 | ul { 19 | margin: 0; 20 | padding: 0; 21 | list-style: none; 22 | } 23 | 24 | li { display: inline-block; } 25 | 26 | a { 27 | display: block; 28 | padding: 6px 12px; 29 | text-decoration: none; 30 | } 31 | 32 | @each $animal in puma, sea-slug, egret, salamander { 33 | .#{$animal}-icon { 34 | background-image: url('/images/#{$animal}.png'); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.sparql.txt: -------------------------------------------------------------------------------- 1 | SELECT ?x ?name 2 | { 3 | ?x foaf:mbox . 4 | ?x foaf:knows ?a1 . 5 | ?a1 foaf:knows ?a2 . 6 | ?a2 foaf:name ?name . 7 | } 8 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.st.txt: -------------------------------------------------------------------------------- 1 | CONFIGURATION DefaultCfg 2 | VAR_GLOBAL 3 | Start_Stop AT %IX0.0: BOOL; (* This is a comment *) 4 | END_VAR 5 | TASK NewTask (INTERVAL := T#20ms); 6 | PROGRAM Main WITH NewTask : PLC_PRG; 7 | END_CONFIGURATION 8 | 9 | PROGRAM demo 10 | VAR_EXTERNAL 11 | Start_Stop: BOOL; 12 | END_VAR 13 | VAR 14 | a : REAL; // Another comment 15 | todTest: TIME_OF_DAY := TOD#12:55; 16 | END_VAR 17 | a := csq(12.5); 18 | TON1(IN := TRUE, PT := T#2s); 19 | 16#FAC0 2#1001_0110 20 | IF TON1.Q AND a > REAL#100 THEN 21 | Start_Stop := TRUE; 22 | END_IF 23 | END_PROGRAM; 24 | 25 | /* Get a square of the circle */ 26 | FUNCTION csq : REAL 27 | VAR_INPUT 28 | r: REAL; 29 | END_VAR 30 | VAR CONSTANT 31 | c_pi: REAL := 3.14; 32 | END_VAR 33 | csq := ABS(c_pi * (r * 2)); 34 | END_FUNCTION -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.systemverilog.txt: -------------------------------------------------------------------------------- 1 | // File : tb_top.sv 2 | module tb_top (); 3 | 4 | reg clk; 5 | reg resetn; 6 | reg d; 7 | wire q; 8 | 9 | // Instantiate the design 10 | d_ff d_ff0 ( .clk (clk), 11 | .resetn (resetn), 12 | .d (d), 13 | .q (q)); 14 | 15 | // Create a clock 16 | always #10 clk <= ~clk; 17 | 18 | initial begin 19 | resetn <= 0; 20 | d <= 0; 21 | 22 | #10 resetn <= 1; 23 | #5 d <= 1; 24 | #8 d <= 0; 25 | #2 d <= 1; 26 | #10 d <= 0; 27 | end 28 | endmodule 29 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.tcl.txt: -------------------------------------------------------------------------------- 1 | proc find {{basedir .} {filterScript {}}} { 2 | set oldwd [pwd] 3 | cd $basedir 4 | set cwd [pwd] 5 | set filenames [glob -nocomplain * .*] 6 | set files {} 7 | set filt [string length $filterScript] 8 | foreach filename $filenames { 9 | if {!$filt || [eval $filterScript [list $filename]]} { 10 | lappend files [file join $cwd $filename] 11 | } 12 | if {[file isdirectory $filename]} { 13 | set files [concat $files [find $filename $filterScript]] 14 | } 15 | } 16 | cd $oldwd 17 | return $files 18 | } 19 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.twig.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} 6 | {% block stylesheets %}{% endblock %} 7 | 8 | 9 | {% block body %}{% endblock %} 10 | {% block javascripts %}{% endblock %} 11 | 12 | 13 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.xml.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /website/src/website/data/home-samples/sample.yaml.txt: -------------------------------------------------------------------------------- 1 | %TAG ! tag:clarkevans.com,2002: 2 | --- !shape 3 | # Use the ! handle for presenting 4 | # tag:clarkevans.com,2002:circle 5 | - !circle 6 | center: &ORIGIN {x: 73, y: 129} 7 | radius: 7 8 | - !line 9 | start: *ORIGIN 10 | finish: { x: 89, y: 102 } 11 | - !label 12 | start: *ORIGIN 13 | color: 0xFFEEBB 14 | text: Pretty vector drawing. 15 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/chapter.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Creating The Diff Editor" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.js: -------------------------------------------------------------------------------- 1 | const originalModel = monaco.editor.createModel( 2 | /* set from `originalModel`: */ `hello world`, 3 | "text/plain" 4 | ); 5 | const modifiedModel = monaco.editor.createModel( 6 | /* set from `modifiedModel`: */ `Hello World!`, 7 | "text/plain" 8 | ); 9 | 10 | const diffEditor = monaco.editor.createDiffEditor( 11 | document.getElementById("container"), 12 | { 13 | originalEditable: true, 14 | automaticLayout: true, 15 | } 16 | ); 17 | diffEditor.setModel({ 18 | original: originalModel, 19 | modified: modifiedModel, 20 | }); 21 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Hello Diff World" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.js: -------------------------------------------------------------------------------- 1 | var originalModel = monaco.editor.createModel( 2 | "This line is removed on the right.\njust some text\nabcd\nefgh\nSome more text", 3 | "text/plain" 4 | ); 5 | var modifiedModel = monaco.editor.createModel( 6 | "just some text\nabcz\nzzzzefgh\nSome more text\nThis line is removed on the left.", 7 | "text/plain" 8 | ); 9 | 10 | var diffEditor = monaco.editor.createDiffEditor( 11 | document.getElementById("container"), 12 | { 13 | // You can optionally disable the resizing 14 | enableSplitViewResizing: false, 15 | 16 | // Render the diff inline 17 | renderSideBySide: false, 18 | } 19 | ); 20 | diffEditor.setModel({ 21 | original: originalModel, 22 | modified: modifiedModel, 23 | }); 24 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Inline Diff Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.js: -------------------------------------------------------------------------------- 1 | var originalModel = monaco.editor.createModel( 2 | "This line is removed on the right.\njust some text\nabcd\nefgh\nSome more text", 3 | "text/plain" 4 | ); 5 | var modifiedModel = monaco.editor.createModel( 6 | "just some text\nabcz\nzzzzefgh\nSome more text.\nThis line is removed on the left.", 7 | "text/plain" 8 | ); 9 | 10 | var diffEditor = monaco.editor.createDiffEditor( 11 | document.getElementById("container"), 12 | { 13 | // You can optionally disable the resizing 14 | enableSplitViewResizing: false, 15 | } 16 | ); 17 | diffEditor.setModel({ 18 | original: originalModel, 19 | modified: modifiedModel, 20 | }); 21 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Multi Line Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/chapter.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Creating The Editor", 3 | "sortingKey": 100 4 | } 5 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.js: -------------------------------------------------------------------------------- 1 | // Through the options literal, the behaviour of the editor can be easily customized. 2 | // Here are a few examples of config options that can be passed to the editor. 3 | // You can also call editor.updateOptions at any time to change the options. 4 | 5 | var editor = monaco.editor.create(document.getElementById("container"), { 6 | value: "// First line\nfunction hello() {\n\talert('Hello world!');\n}\n// Last line", 7 | language: "javascript", 8 | 9 | lineNumbers: "off", 10 | roundedSelection: false, 11 | scrollBeyondLastLine: false, 12 | readOnly: false, 13 | theme: "vs-dark", 14 | }); 15 | setTimeout(function () { 16 | editor.updateOptions({ 17 | lineNumbers: "on", 18 | }); 19 | }, 2000); 20 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Editor Basic Options" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Hard Wrapping" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.js: -------------------------------------------------------------------------------- 1 | const value = /* set from `myEditor.getModel()`: */ `function hello() { 2 | alert('Hello world!'); 3 | }`; 4 | 5 | // Hover on each property to see its docs! 6 | const myEditor = monaco.editor.create(document.getElementById("container"), { 7 | value, 8 | language: "javascript", 9 | automaticLayout: true, 10 | }); 11 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Hello World", 3 | "sortingKey": 100 4 | } 5 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.html: -------------------------------------------------------------------------------- 1 |
 2 | /* Some example CSS */
 3 | 
 4 | @import url("something.css");
 5 | 
 6 | body {
 7 |   margin: 0;
 8 |   padding: 3em 6em;
 9 |   font-family: tahoma, arial, sans-serif;
10 |   color: #000;
11 | }
12 | 
13 | #navigation a {
14 |   font-weight: bold;
15 |   text-decoration: none !important;
16 | }
17 | 
18 | h1 {
19 |   font-size: 2.5em;
20 | }
21 | 
22 | h2 {
23 |   font-size: 1.7em;
24 | }
25 | 
26 | h1:before, h2:before {
27 |   content: "some contents";
28 | }
29 | 
30 | code {
31 |   font-family: courier, monospace;
32 |   font-size: 80%;
33 |   color: #418A8A;
34 | }
35 | 
36 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.js: -------------------------------------------------------------------------------- 1 | // The colorizeElement-function will read the data-lang-attribute 2 | // from the element to select the correct language mode. In this 3 | // sample it is text/css. 4 | monaco.editor.colorizeElement(document.getElementById("code"), {}); 5 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Syntax Highlighting For Html Elements" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/web-component/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/web-component/sample.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/creating-the-editor/web-component/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Web Component", 3 | "sortingKey": 10000 4 | } 5 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/chapter.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Customizing The Appearance" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Exposed Colors" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.css: -------------------------------------------------------------------------------- 1 | /* Make horizontal scrollbar, decorations overview ruler and vertical scrollbar arrows opaque */ 2 | .monaco-editor .monaco-scrollable-element .scrollbar.horizontal, 3 | .monaco-editor .decorationsOverviewRuler, 4 | .monaco-editor 5 | .monaco-scrollable-element 6 | .scrollbar.vertical 7 | .arrow-background { 8 | background: rgba(230, 230, 230, 255); 9 | } 10 | /* Make vertical scrollbar transparent to allow decorations overview ruler to be visible */ 11 | .monaco-editor .monaco-scrollable-element .scrollbar.vertical { 12 | background: rgba(0, 0, 0, 0); 13 | } 14 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Scrollbars" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Tokens And Colors" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/chapter.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Extending Language Services" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Codelens Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Color Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Completion Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Configure Javascript Defaults" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Configure Json Defaults" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Custom Languages" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Folding Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Hover Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Inlay Hints Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Model Markers Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Semantic Tokens Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Symbols Provider Example" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Adding a Command to an Editor Instance" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Adding a Keybinding to an Existing Command" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Adding an Action to an Editor Instance" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/chapter.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Interacting With The Editor" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.js: -------------------------------------------------------------------------------- 1 | function lineNumbersFunc(originalLineNumber) { 2 | var map = [ 3 | "O", 4 | "I", 5 | "II", 6 | "III", 7 | "IV", 8 | "V", 9 | "VI", 10 | "VII", 11 | "VIII", 12 | "IX", 13 | "X", 14 | ]; 15 | if (originalLineNumber < map.length) { 16 | return map[originalLineNumber]; 17 | } 18 | return originalLineNumber; 19 | } 20 | 21 | var jsCode = [ 22 | '"use strict";', 23 | "function Person(age) {", 24 | " if (age) {", 25 | " this.age = age;", 26 | " }", 27 | "}", 28 | "Person.prototype.getAge = function () {", 29 | " return this.age;", 30 | "};", 31 | ].join("\n"); 32 | 33 | var editor = monaco.editor.create(document.getElementById("container"), { 34 | value: jsCode, 35 | language: "javascript", 36 | lineNumbers: lineNumbersFunc, 37 | }); 38 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Customizing The Line Numbers" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.css: -------------------------------------------------------------------------------- 1 | .myInlineDecoration { 2 | color: red !important; 3 | cursor: pointer; 4 | text-decoration: underline; 5 | font-weight: bold; 6 | font-style: oblique; 7 | } 8 | 9 | .myLineDecoration { 10 | background: lightblue; 11 | width: 5px !important; 12 | margin-left: 3px; 13 | } 14 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js: -------------------------------------------------------------------------------- 1 | var jsCode = [ 2 | '"use strict";', 3 | "function Person(age) {", 4 | " if (age) {", 5 | " this.age = age;", 6 | " }", 7 | "}", 8 | "Person.prototype.getAge = function () {", 9 | " return this.age;", 10 | "};", 11 | ].join("\n"); 12 | 13 | var editor = monaco.editor.create(document.getElementById("container"), { 14 | value: jsCode, 15 | language: "javascript", 16 | }); 17 | 18 | var decorations = editor.createDecorationsCollection([ 19 | { 20 | range: new monaco.Range(3, 1, 5, 1), 21 | options: { 22 | isWholeLine: true, 23 | linesDecorationsClassName: "myLineDecoration", 24 | }, 25 | }, 26 | { 27 | range: new monaco.Range(7, 1, 7, 24), 28 | options: { inlineClassName: "myInlineDecoration" }, 29 | }, 30 | ]); 31 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Line and Inline Decorations" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.js: -------------------------------------------------------------------------------- 1 | var editor = monaco.editor.create(document.getElementById("container"), { 2 | value: "function hello() {\n\talert('Hello world!');\n}", 3 | language: "javascript", 4 | }); 5 | 6 | var myBinding = editor.addCommand(monaco.KeyCode.F9, function () { 7 | alert("F9 pressed!"); 8 | }); 9 | 10 | // You can't dispose `addCommand` 11 | // If you need to dispose it you might use `addAction` or `registerCommand` 12 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Listening To Key Events" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.css: -------------------------------------------------------------------------------- 1 | .myGlyphMarginClass { 2 | background: red; 3 | } 4 | .myContentClass { 5 | background: lightblue; 6 | } 7 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.html: -------------------------------------------------------------------------------- 1 |
2 | Last 3 events:
3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Listening To Mouse Events" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.css: -------------------------------------------------------------------------------- 1 | .myGlyphMarginClass { 2 | background: red; 3 | } 4 | .myContentClass { 5 | /* Make sure to use transparent colors for the selection to work */ 6 | background: rgba(173, 216, 230, 0.5); 7 | } 8 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js: -------------------------------------------------------------------------------- 1 | var jsCode = [ 2 | '"use strict";', 3 | "function Person(age) {", 4 | " if (age) {", 5 | " this.age = age;", 6 | " }", 7 | "}", 8 | "Person.prototype.getAge = function () {", 9 | " return this.age;", 10 | "};", 11 | ].join("\n"); 12 | 13 | var editor = monaco.editor.create(document.getElementById("container"), { 14 | value: jsCode, 15 | language: "javascript", 16 | glyphMargin: true, 17 | }); 18 | 19 | var decorations = editor.createDecorationsCollection([ 20 | { 21 | range: new monaco.Range(3, 1, 3, 1), 22 | options: { 23 | isWholeLine: true, 24 | className: "myContentClass", 25 | glyphMarginClassName: "myGlyphMarginClass", 26 | }, 27 | }, 28 | ]); 29 | 30 | // You can now use `decorations` to change or remove the decoration 31 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Rendering Glyphs In The Margin" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/monaco-editor/dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.css -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Revealing a Position" 3 | } 4 | -------------------------------------------------------------------------------- /website/src/website/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import * as ReactDOM from "react-dom"; 3 | import "./bootstrap.scss"; 4 | import "./style.scss"; 5 | import { App } from "./pages/App"; 6 | 7 | const elem = document.createElement("div"); 8 | elem.className = "root"; 9 | document.body.append(elem); 10 | ReactDOM.render(, elem); 11 | -------------------------------------------------------------------------------- /website/src/website/monaco-loader-chunk.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | // This is an optional load optimization - it inlines the AMD loader and the core editor. 7 | // We have to configure this before loading editor.main, as it tries to load css 8 | (global as any).require = { 9 | paths: { vs: "node_modules/monaco-editor/min/vs" }, 10 | }; 11 | require("script-loader!../../node_modules/monaco-editor/min/vs/loader"); 12 | require("script-loader!../../node_modules/monaco-editor/min/vs/editor/editor.main.js"); 13 | import { loadMonaco } from "../monaco-loader"; 14 | 15 | loadMonaco(); 16 | -------------------------------------------------------------------------------- /website/src/website/monacoEditorVersion.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import packageJson from "monaco-editor/package.json"; 7 | 8 | export const monacoEditorVersion = packageJson.version; 9 | -------------------------------------------------------------------------------- /website/src/website/pages/App.tsx: -------------------------------------------------------------------------------- 1 | import { Home } from "./home/Home"; 2 | import { PlaygroundPage } from "./playground/PlaygroundPage"; 3 | import { docs, home, monarch, playground } from "./routes"; 4 | import * as React from "react"; 5 | import { DocsPage } from "./DocsPage"; 6 | import { MonarchPage } from "./MonarchPage"; 7 | 8 | export class App extends React.Component { 9 | render() { 10 | if (home.isActive) { 11 | return ; 12 | } else if (playground.isActive) { 13 | return ; 14 | } else if (docs.isActive) { 15 | return ; 16 | } else if (monarch.isActive) { 17 | return ; 18 | } 19 | return <>Page does not exist; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /website/src/website/pages/MonarchPage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Page } from "../components/Page"; 3 | 4 | export class MonarchPage extends React.Component<{}, {}> { 5 | render() { 6 | return ( 7 | 8 |