diff --git a/.prettierrc.json b/.prettierrc.json index 9005559..f6b548e 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -13,7 +13,7 @@ { "files": "*.md", "options": { - "printWidth": 90, + "printWidth": 120, "proseWrap": "always" } } diff --git a/intellij/GapStyle/META-INF/pluginIcon.svg b/intellij/GapStyle/META-INF/pluginIcon.svg new file mode 100644 index 0000000..dc005f1 --- /dev/null +++ b/intellij/GapStyle/META-INF/pluginIcon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/intellij/GapStyle/META-INF/pluginIcon_dark.svg b/intellij/GapStyle/META-INF/pluginIcon_dark.svg new file mode 100644 index 0000000..dc005f1 --- /dev/null +++ b/intellij/GapStyle/META-INF/pluginIcon_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vscode/CHANGELOG.md b/vscode/CHANGELOG.md index b5f20fa..f819f01 100644 --- a/vscode/CHANGELOG.md +++ b/vscode/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to the "gapstylevs" extension will be documented in this file. +## [2.0.0] - 2021-10-31 + +- Add Dart, Ruby, Erlang, Elixir support +- Support C++, Python, Java semantic highlighting +- Huge rework on all markup language including CSS, Less, SASS, SCSS, YAML, TOML +- Huge rework on all template language including HTML, XML, JSX, Angular Template, Vue Template, JSP, Velocity, JADE + ## [1.6.3] - 2020-05-10 - Support GraphQL for VSCode Plugin diff --git a/vscode/LICENSE b/vscode/LICENSE new file mode 100644 index 0000000..5331769 --- /dev/null +++ b/vscode/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Gary Lo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vscode/README.md b/vscode/README.md index 8ef0ae9..a8d8e64 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -1,30 +1,34 @@ -# GapStyle VS Theme +# GapStyle VS - Being Productive Beyond Your Status Quo. + +The world-first\* productivity-oriented color scheme for intelliJ, VSCode to fill the gap between programming languages +and human. ![screenshots](https://raw.githubusercontent.com/gaplo917/GapStyle/master/vscode/screenshots/sample.ts.png) -GapStyle is a **_productivity-oriented_** and **_semantic-driven_** designed color scheme -with a [list of supported languages](#actively-maintain-language). Each supported language -is tailor made and carefully tuned with -[rationale](https://github.com/gaplo917/gapstyle#gapstyle-specification). +GapStyle is a **_world-first_\*** **_productivity-oriented_** and **_semantic-highlighting-driven_** designed color +scheme that **_[each supported language](#actively-maintain-language)_** is tailored with +**_[rich colors while maintaining a comfortable contrast](#gapstyle-specification)_** to help developers boost reading +and writing speed in different programming languages. -GapStyle VS is designed with `semanticHighlighting` from draft, please -[enable semanticHighlighting](#enable-semantic-highlighting) for best syntax highlighting -experience. +\* world-first color scheme uses [https://github.com/gaplo917/GapStyle/tree/master/spec#color-palette](color affinity +design to boost developers' productivity by representing semantically similar syntax), i.e. class, abstract class, and +interface in Kotlin, Java, Scala, etc. See +[GapStyle Specification](https://github.com/gaplo917/GapStyle/tree/master/spec#color-palette) ## Objectives -- Optimize languages' color schemes to boost productivity on reading/writing code - (Especially the language your are not familiar) +- Optimize languages' color schemes to boost reading and writing speed on different languages. (Especially the language + you are not familiar) - Quickly learn similar syntax with a universal designed color across different languages -- Spot syntax error before IDE inspection +- Spot errors before program execution ## Actively Maintain Language -| IDE | Supported Language | -| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| VSCode | Javascript, Typescript, C++, Go, Rust, Python, PHP, Kotlin, Java, Swift, Scala, GraphQL, HTML, XML, JSX, CSS/SCSS/SASS, YAML, TOML, SQL, Protobuf, Properties, Shell | -| IntelliJ | Kotlin, Java, Swift, Scala, Javascript, Typescript, GraphQL, Android Logcat, Gradle, C++, Go, Python, PHP, HTML, XML, JSX, CSS/SCSS/SASS, YAML, TOML, SQL, Protobuf, Properties, Shell | -| XCode | Swift, Objective C | +| IDE | Supported Language | +| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| VSCode (Semantic Highlight) | Javascript, Typescript, C/C++, Java, Python | +| VSCode (Standard Syntax Highlight) | Rust, Ruby, Dart, Go, PHP, Kotlin, Swift, Scala, Erlang, Elixir,GraphQL, HTML, XML, JSX, CSS/SCSS/SASS, YAML, TOML, SQL, Protobuf, Properties, Shell, Angular, Vue.js | +| IntelliJ | Kotlin, Java, Swift, Dart, Rust, Scala, Javascript, Typescript, Go, Python, R, Android Logcat, Android Native (C / C++), Objective-C, SQL, HTML, CSS, PHP, Ruby, Erlang, Elixir | ## Enable Semantic Highlighting @@ -35,9 +39,7 @@ experience. ``` { "workbench.colorTheme": "GapStyle VS", - "editor.semanticTokenColorCustomizations": { - "enabled": true - } + "editor.semanticTokenColorCustomizations.enabled": true, } ``` @@ -50,20 +52,18 @@ experience. | [Hack](https://github.com/source-foundry/Hack) | VSCode | ❌ | Standard Hack font | [Download](https://github.com/source-foundry/Hack/releases) | 1. Install the recommended font into your system (i.e. Hack JBM Ligatured CCG) -1. Command + Shift + P -1. Search `settings.json` & Open -1. Paste the follow config +2. Command + Shift + P +3. Search `settings.json` & Open +4. Paste the follow config VSCode Editor Config (Full config) ``` { "workbench.colorTheme": "GapStyle VS", + "editor.semanticTokenColorCustomizations.enabled": true, "editor.fontFamily": "'Hack JBM Ligatured CCG', 'Hack', Menlo, Monaco, 'Courier New', monospace", "editor.fontLigatures": true, - "editor.semanticTokenColorCustomizations": { - "enabled": true - } } ``` diff --git a/vscode/RELEASE.md b/vscode/RELEASE.md index aa583da..a312af2 100644 --- a/vscode/RELEASE.md +++ b/vscode/RELEASE.md @@ -17,3 +17,11 @@ Update `README.md` 1. Run `npm run publish` (May need to `npx vsce login gaplo917`) + +### Generate Personal Access Token + +Read + +- https://code.visualstudio.com/api/working-with-extensions/publishing-extension + +- https://dev.azure.com/gaplotech/_usersSettings/tokens diff --git a/vscode/icon.png b/vscode/icon.png index bc88259..1dd6e25 100644 Binary files a/vscode/icon.png and b/vscode/icon.png differ diff --git a/vscode/package-lock.json b/vscode/package-lock.json index f7ad63c..dcf5ec3 100644 --- a/vscode/package-lock.json +++ b/vscode/package-lock.json @@ -1,15 +1,9 @@ { "name": "gapstylevs", - "version": "0.0.1", + "version": "2.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { - "@types/node": { - "version": "13.9.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz", - "integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA==", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -60,15 +54,13 @@ } }, "azure-devops-node-api": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", - "integrity": "sha512-pMfGJ6gAQ7LRKTHgiRF+8iaUUeGAI0c8puLaqHLc7B8AR7W6GJLozK9RFeUHFjEGybC9/EB3r67WPd7e46zQ8w==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-11.0.1.tgz", + "integrity": "sha512-YMdjAw9l5p/6leiyIloxj3k7VIvYThKjvqgiQn88r3nhT93ENwsoDS3A83CyJ4uTWzCZ5f5jCi6c27rTU5Pz+A==", "dev": true, "requires": { - "os": "0.1.1", - "tunnel": "0.0.4", - "typed-rest-client": "1.2.0", - "underscore": "1.8.3" + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" } }, "balanced-match": { @@ -129,6 +121,16 @@ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", @@ -153,17 +155,31 @@ } }, "cheerio": { - "version": "1.0.0-rc.3", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz", - "integrity": "sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==", + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", + "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", "dev": true, "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.1", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash": "^4.15.0", - "parse5": "^3.0.1" + "cheerio-select": "^1.5.0", + "dom-serializer": "^1.3.2", + "domhandler": "^4.2.0", + "htmlparser2": "^6.1.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "tslib": "^2.2.0" + } + }, + "cheerio-select": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", + "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", + "dev": true, + "requires": { + "css-select": "^4.1.3", + "css-what": "^5.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0", + "domutils": "^2.7.0" } }, "chokidar": { @@ -210,9 +226,9 @@ "dev": true }, "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true }, "concat-map": { @@ -262,21 +278,22 @@ "dev": true }, "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", + "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", "dev": true, "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" + "boolbase": "^1.0.0", + "css-what": "^5.0.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0", + "nth-check": "^2.0.0" } }, "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", + "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", "dev": true }, "debug": { @@ -300,45 +317,41 @@ "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", "dev": true }, - "didyoumean": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.1.tgz", - "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=", - "dev": true - }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" } }, "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", "dev": true }, "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", + "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", "dev": true, "requires": { - "domelementtype": "1" + "domelementtype": "^2.2.0" } }, "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "dev": true, "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" } }, "dot-prop": { @@ -357,9 +370,9 @@ "dev": true }, "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", "dev": true }, "escape-string-regexp": { @@ -420,6 +433,23 @@ "dev": true, "optional": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -427,9 +457,9 @@ "dev": true }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -483,24 +513,63 @@ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", "dev": true, "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" } }, "ignore-by-default": { @@ -662,6 +731,12 @@ "package-json": "^4.0.0" } }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, "linkify-it": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", @@ -672,9 +747,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lowercase-keys": { @@ -703,16 +778,24 @@ } }, "markdown-it": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", "dev": true, "requires": { "argparse": "^1.0.7", - "entities": "~1.1.1", + "entities": "~2.0.0", "linkify-it": "^2.0.0", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + } } }, "mdurl": { @@ -797,14 +880,20 @@ } }, "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", "dev": true, "requires": { - "boolbase": "~1.0.0" + "boolbase": "^1.0.0" } }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -814,12 +903,6 @@ "wrappy": "1" } }, - "os": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/os/-/os-0.1.1.tgz", - "integrity": "sha1-IIhF6J4ZOtTZcUdLk5R3NqVtE/M=", - "dev": true - }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -870,12 +953,18 @@ } }, "parse5": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", - "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", "dev": true, "requires": { - "@types/node": "*" + "parse5": "^6.0.1" } }, "path-is-absolute": { @@ -932,6 +1021,15 @@ "integrity": "sha512-xsMgrUwRpuGskEzBFkH8NmTimbZ5PcPup0LA8JJkHIm2IMUbQcpo3yeLNWVrufEYjh8YwtSVh0xz6UeWc5Oh5A==", "dev": true }, + "qs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -953,17 +1051,6 @@ "mute-stream": "~0.0.4" } }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "readdirp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", @@ -992,12 +1079,27 @@ "rc": "^1.0.1" } }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "safe-buffer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -1028,6 +1130,17 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -1050,15 +1163,6 @@ "strip-ansi": "^4.0.0" } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -1111,12 +1215,12 @@ "dev": true }, "tmp": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", - "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, "requires": { - "os-tmpdir": "~1.0.1" + "rimraf": "^3.0.0" } }, "to-regex-range": { @@ -1137,20 +1241,27 @@ "nopt": "~1.0.10" } }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "tunnel": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", "dev": true }, "typed-rest-client": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.2.0.tgz", - "integrity": "sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.6.tgz", + "integrity": "sha512-xcQpTEAJw2DP7GqVNECh4dD+riS+C1qndXLfBCJ3xk0kqprtGN491P5KlmrDbKdtuW8NEcP/5ChxiJI3S9WYTA==", "dev": true, "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" } }, "uc.micro": { @@ -1186,9 +1297,9 @@ } }, "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", "dev": true }, "unique-string": { @@ -1239,36 +1350,32 @@ "prepend-http": "^1.0.1" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "vsce": { - "version": "1.74.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.74.0.tgz", - "integrity": "sha512-8zWM9bZBNn9my40kkxAxdY4nhb9ADfazXsyDgx1thbRaLPbmPTlmqQ55vCAyWYFEi6XbJv8w599vzVUqsU1gHg==", + "version": "1.100.2", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.100.2.tgz", + "integrity": "sha512-eDeubJNc0iav6mbTESZ90E9WcSzqAAl/lunb4KbNjRrz9tf+657i1mKhnWUyvK7Y4D8kN5NBD2FXD4FFMZj7ig==", "dev": true, "requires": { - "azure-devops-node-api": "^7.2.0", + "azure-devops-node-api": "^11.0.1", "chalk": "^2.4.2", - "cheerio": "^1.0.0-rc.1", - "commander": "^2.8.1", + "cheerio": "^1.0.0-rc.9", + "commander": "^6.1.0", "denodeify": "^1.2.1", - "didyoumean": "^1.2.1", "glob": "^7.0.6", + "hosted-git-info": "^4.0.2", + "leven": "^3.1.0", "lodash": "^4.17.15", - "markdown-it": "^8.3.1", + "markdown-it": "^10.0.0", "mime": "^1.3.4", "minimatch": "^3.0.3", "osenv": "^0.1.3", "parse-semver": "^1.1.1", "read": "^1.0.7", "semver": "^5.1.0", - "tmp": "0.0.29", - "typed-rest-client": "1.2.0", + "tmp": "^0.2.1", + "typed-rest-client": "^1.8.4", "url-join": "^1.1.0", + "xml2js": "^0.4.23", "yauzl": "^2.3.1", "yazl": "^2.2.2" } @@ -1314,6 +1421,22 @@ "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", "dev": true }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", diff --git a/vscode/package.json b/vscode/package.json index 178b4c7..930dee9 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -1,8 +1,8 @@ { "name": "gapstylevs", "displayName": "GapStyle VS", - "description": "A productivity-oriented dark theme for VSCode, IntelliJ, XCode. Each supported language is tailor made and carefully tuned with rationale", - "version": "1.6.3", + "description": "A world-first* productivity-oriented designed color scheme.", + "version": "2.0.0", "publisher": "gaplo917", "repository": { "type": "git", @@ -16,13 +16,13 @@ "Themes" ], "keywords": [ - "productivity", - "semantic-highlighting", - "monokai", - "dark", + "gapstyle", "theme", - "color-theme", - "gapstyle" + "color theme", + "monokai", + "one dark pro", + "semantic highlighting", + "productivity" ], "icon": "icon.png", "galleryBanner": { @@ -49,6 +49,6 @@ "js-yaml": "^3.13.1", "nodemon": "^2.0.2", "tinycolor2": "^1.4.1", - "vsce": "^1.74.0" + "vsce": "^1.100.2" } } diff --git a/vscode/src/gapstyle.yml b/vscode/src/gapstyle.yml index efb56f1..67b9d89 100644 --- a/vscode/src/gapstyle.yml +++ b/vscode/src/gapstyle.yml @@ -28,13 +28,14 @@ variables: - &INTERFACE '#0ED38B' - &DECORATOR '#BBB529' - &XML_TAG '#E8BF6A' - - &XML_ATTR '#BABABA' - - &XML_STRING '#A5C261' + - &XML_ATTR '#CECECE' + - &XML_STRING '#6FD27C' - &JSON_PROPERTY '#CF8823' - &SASS_VAR '#6D9CBE' - &MACRO '#328F54' - &RELAX_MD_KEYWORD '#F96B9D' - &RELAX_MD_STRING '#E6DB85' + - &HIGHLIGHT_BG '#383A3C' colors: # From my faviourite One Dark Pro Theme activityBar.background: "#282c34" @@ -155,11 +156,22 @@ semanticTokenColors: foreground: *TYPE_PARAM typeParameter: - foreground: &TYPE_PARAM + foreground: *TYPE_PARAM class: foreground: *CLASS + class.typeArgument: + foreground: *TYPE_PARAM + + class.typeHint: + foreground: *TYPE_PARAM + fontStyle: '' + + class.builtin: + foreground: *KEYWORD + fontStyle: bold + class.defaultLibrary: fontStyle: italic foreground: *PREDEFINED @@ -173,6 +185,9 @@ semanticTokenColors: function: foreground: *FUNCTION + function.builtin: + fontStyle: italic + function.defaultLibrary: fontStyle: italic foreground: *FUNCTION @@ -181,6 +196,13 @@ semanticTokenColors: fontStyle: '' foreground: *FUNCTION + method: + foreground: *FUNCTION + + method.static: + foreground: *FUNCTION + fontStyle: italic + member: fontStyle: '' foreground: *FUNCTION @@ -195,12 +217,15 @@ semanticTokenColors: fontStyle: 'italic' foreground: *LOCAL_VAR + variable.global: + fontStyle: 'italic' + foreground: *PREDEFINED + variable.local: fontStyle: '' foreground: *LOCAL_VAR variable.readonly: - foreground: *LOCAL_VAR variable.defaultLibrary: @@ -227,6 +252,34 @@ semanticTokenColors: event: foreground: *DEFAULT + templateType: + foreground: *CLASS + + templateFunction: + foreground: *FUNCTION + + genericType: + foreground: *TYPE_PARAM + + label: + foreground: *DECORATOR + + newOperator: + foreground: *KEYWORD + + operatorOverload: + foreground: *FUNCTION + + memberOperatorOverload: + foreground: *FUNCTION + + referenceType: + fontStyle: italic + + selfParameter: + foreground: *KEYWORD + fontStyle: bold + tokenColors: # ============================================================================= # General @@ -263,6 +316,10 @@ tokenColors: - name: Strings scope: - string + - constant.other.symbol.double-quoted + - constant.other.symbol.double-quoted punctuation.definition.constant + - constant.other.symbol.single-quoted + - constant.other.symbol.single-quoted punctuation.definition.constant settings: foreground: *STRING @@ -422,7 +479,8 @@ tokenColors: scope: - entity.name.tag settings: - foreground: *KEYWORD + foreground: *XML_TAG + fontStyle: bold - name: Default attribute parent selectors ('&') scope: @@ -517,6 +575,7 @@ tokenColors: - name: Language Built-ins scope: - support + - source settings: foreground: *DEFAULT @@ -966,35 +1025,50 @@ tokenColors: - name: HTML Tag scope: - - text.html meta.tag entity.name.tag - - text.html meta.tag entity.name.tag + - meta.tag entity.name.tag.html + - meta.tag entity.name.tag.html - entity.name.tag.block.any.html - entity.name.tag.script.html + - entity.name.tag.style.html settings: - foreground: *KEYWORD + foreground: *XML_TAG fontStyle: bold + - name: HTML Tag Punctuation + scope: + - punctuation.definition.tag.begin.html + - punctuation.definition.tag.end.html + settings: + foreground: *DEFAULT + - name: HTML Attribute scope: - - text.html entity.other.attribute-name + - entity.other.attribute-name.html + - entity.other.attribute-name.id.html settings: - foreground: *ATTR_NAME - fontStyle: bold + foreground: *XML_ATTR + + - name: HTML Arrtibute Value + scope: + - punctuation.definition.string.begin.html + - punctuation.definition.string.end.html + - string.quoted.double.html + settings: + foreground: *XML_STRING - name: HTML Speical character scope: - constant.character.entity.numeric.hexadecimal.html - punctuation.definition.entity.html - - text.html constant.character.entity.named + - constant.character.entity.named.html settings: - foreground: *NUMBER + foreground: *SASS_VAR # ============================================================================= # XML # ============================================================================= - name: XML TAG scope: - - meta.tag.xml - meta.tag.xml entity.name.tag.localname.xml - meta.tag.xml entity.name.tag.namespace.xml - meta.tag.xml entity.other.attribute-name.namespace.xml @@ -1002,9 +1076,13 @@ tokenColors: - meta.tag.preprocessor.xml entity.name.tag.xml - meta.tag.sgml.doctype.xml keyword.other.doctype.xml - meta.tag.sgml.doctype.xml variable.language.documentroot.xml - - punctuation.definition.tag.xml settings: foreground: *XML_TAG + - name: XML TAG Punctuation + scope: + - punctuation.definition.tag.xml + settings: + foreground: *DEFAULT - name: XML Attribute scope: - meta.tag.xml entity.other.attribute-name.localname.xml @@ -1063,9 +1141,10 @@ tokenColors: scope: - meta.property-name support.type.property-name.css - support.type.vendored.property-name.css + - entity.other.attribute-name.css settings: - foreground: *ATTR_NAME - fontStyle: bold + foreground: *XML_ATTR + fontStyle: italic - name: Css HEX Color scope: @@ -1082,33 +1161,53 @@ tokenColors: - constant.language.color.rgb-value.css - source.css keyword.other.unit - support.constant.property-value.css + - support.constant.color.w3c-standard-color-name.css + - constant.numeric.css keyword.other.unit + - meta.attribute-selector.css string.quoted.double.css + - meta.attribute-selector.css string.quoted.double.css punctuation.definition.string.begin.css + - meta.attribute-selector.css string.quoted.double.css punctuation.definition.string.end.css settings: - foreground: *STRING + foreground: *XML_STRING fontStyle: '' - name: Css Function scope: - meta.function.color.css support.function.misc.css - support.constant.font-name.css + - source.css support.function settings: - foreground: *KEYWORD - fontStyle: bold + foreground: *XML_STRING + fontStyle: italic - - name: Css Keywords + - name: Css Selectors scope: - entity.other.attribute-name.id.css - entity.other.attribute-name.pseudo-element.css - entity.name.tag.css - entity.name.tag.custom.css - - constant.other.unicode-range.css - punctuation.definition.constant.css - support.constant.language-range.css - entity.other.attribute-name.class.css - entity.other.attribute-name.pseudo-class.css - support.type.property-name.css settings: - foreground: *KEYWORD + foreground: *XML_TAG fontStyle: bold + + - name: Css Unicode + scope: + - constant.other.unicode-range.css + - punctuation.separator.dash.unicode-range.css + settings: + foreground: *SASS_VAR + + - name: Css Import + scope: + - meta.at-rule.import.css string.quoted.double.css + settings: + foreground: *STRING + fontStyle: '' + # ============================================================================= # SASS / SCSS # ============================================================================= @@ -1116,8 +1215,41 @@ tokenColors: scope: - variable.scss - source.sass variable + - meta.property-list.css.scss.prop meta.property-value.css.scss support.constant.property-value.css.scss + - meta.property-list.css.scss.prop constant.character.module constant.character.module.name + - meta.property-list.css.sass.prop meta.property-value.css.sass support.constant.property-value.css.sass + - meta.property-list.css.sass.prop constant.character.module constant.character.module.name + settings: + foreground: *SASS_VAR + + - name: SASS/SCSS Modules + scope: + - meta.property-list.css.scss.prop meta.property-value.css.scss support.constant.property-value.css.scss + - meta.property-list.css.scss.prop constant.character.module constant.character.module.name + - meta.property-list.css.scss.prop constant.character.module constant.numeric.module.dot + - meta.property-list.css.sass.prop meta.property-value.css.sass support.constant.property-value.css.sass + - meta.property-list.css.sass.prop constant.character.module constant.character.module.name + - meta.property-list.css.sass.prop constant.character.module constant.numeric.module.dot settings: foreground: *SASS_VAR + fontStyle: underline + + - name: SASS/SCSS Keyword + scope: + - constant.other.scss + - support.type.property-name.css.sass + settings: + foreground: *KEYWORD + fontStyle: bold + + - name: SASS property function + scope: + - source.sass meta.property-list.css.sass.prop entity.name.function + - source.css.scss support.function.misc.scss + - source.css.scss meta.at-rule.include.scss entity.name.function.scss + settings: + foreground: *XML_TAG + fontStyle: italic - name: SASS Interpolation scope: @@ -1135,9 +1267,10 @@ tokenColors: scope: - support.type.property-name.css.sass.prop.name - entity.other.attribute-name.pseudo-class.css.sass + - entity.other.attribute-name.attribute.scss settings: - foreground: *ATTR_NAME - fontStyle: bold + foreground: *XML_ATTR + fontStyle: '' - name: SASS Symbol scope: @@ -1152,7 +1285,6 @@ tokenColors: scope: - comment.punctuation.comma.sass - comment.punctuation.comma.scss - - meta.property-value.scss - source.sass keyword.control.unit - source.scss keyword.control.unit - support.constant.property-value.css.sass @@ -1163,17 +1295,48 @@ tokenColors: - name: SASS Selector scope: - entity.name.tag.custom.scss - - constant.other.scss settings: + foreground: *XML_TAG fontStyle: bold - foreground: *KEYWORD - + + - name: SASS Attribute Selector + scope: + - meta.attribute-selector.scss + - string.quoted.double.attribute-value.scss punctuation.definition.string.begin.scss + - string.quoted.double.attribute-value.scss punctuation.definition.string.end.scss + - string.quoted.single.attribute-value.scss punctuation.definition.string.begin.scss + - string.quoted.single.attribute-value.scss punctuation.definition.string.end.scss + - string.quoted.double.css.sass + - string.quoted.single.css.sass + - support.constant.property-value.css.sass + - keyword.control.unit.css.sass + settings: + foreground: *XML_STRING + fontStyle: '' + + - name: SASS/SCSSS Mixin Function + scope: + - support.function.name.sass entity.name.function + - support.function.name.sass.library + - meta.property-list.css.sass.prop entity.name.function + - source.css.scss meta.at-rule.mixin.scss entity.name.function.scss + settings: + foreground: *XML_TAG + fontStyle: italic + + - name: SASS Function In Property + scope: + - meta.property-list.css.sass.prop entity.name.function + settings: + foreground: *XML_TAG + fontStyle: italic # ============================================================================= # Java # ============================================================================= - name: Java Keyword scope: - constant.language.java + - variable.language.this.java settings: foreground: *KEYWORD fontStyle: bold @@ -1382,6 +1545,8 @@ tokenColors: - name: Typescript / Javascript Decorator scope: - meta.decorator.ts # typescript + - source.ts meta.decorator.ts variable.other.readwrite.ts + - source.js meta.decorator entity.name.function settings: foreground: *DECORATOR @@ -1424,6 +1589,29 @@ tokenColors: - meta.tag.without-attributes.js punctuation.definition.tag.end settings: foreground: *XML_TAG + fontStyle: bold + + - name: JSX Component Punctuation + scope: + - meta.tag.tsx punctuation.definition.tag.begin + - meta.tag.jsx punctuation.definition.tag.begin + - meta.tag.ts punctuation.definition.tag.begin + - meta.tag.js punctuation.definition.tag.begin + - meta.tag.tsx punctuation.definition.tag.end + - meta.tag.jsx punctuation.definition.tag.end + - meta.tag.ts punctuation.definition.tag.end + - meta.tag.js punctuation.definition.tag.end + - meta.tag.without-attributes.tsx punctuation.definition.tag.begin + - meta.tag.without-attributes.jsx punctuation.definition.tag.begin + - meta.tag.without-attributes.ts punctuation.definition.tag.begin + - meta.tag.without-attributes.js punctuation.definition.tag.begin + - meta.tag.without-attributes.tsx punctuation.definition.tag.end + - meta.tag.without-attributes.jsx punctuation.definition.tag.end + - meta.tag.without-attributes.ts punctuation.definition.tag.end + - meta.tag.without-attributes.js punctuation.definition.tag.end + settings: + foreground: *DEFAULT + fontStyle: '' - name: JSX Attribute scope: @@ -1529,6 +1717,7 @@ tokenColors: - name: C++ Keywords scope: - meta.body.namespace.cpp + - variable.language.this.cpp settings: foreground: *KEYWORD @@ -1741,7 +1930,12 @@ tokenColors: settings: foreground: *KEYWORD fontStyle: bold - + - name: Go System Type + scope: + - source.go storage.type + settings: + foreground: *KEYWORD + fontStyle: bold # ============================================================================= # GraphQL (GraphQL for VSCode) # ============================================================================= @@ -1890,6 +2084,7 @@ tokenColors: - name: Protobuf Keyword scope: - constant.language.proto + - keyword.operator.proto settings: foreground: *KEYWORD fontStyle: bold @@ -1919,6 +2114,7 @@ tokenColors: - entity.name.tag.yaml settings: foreground: *MEMBER_VAR + fontStyle: '' - name: YAML Anchor scope: @@ -1957,15 +2153,17 @@ tokenColors: - entity.name.section.toml - variable.other.key.toml - entity.name.tag.toml + - keyword.key.toml settings: foreground: *MEMBER_VAR + fontStyle: '' - name: TOML Table / Array scope: - entity.other.attribute-name.table.toml - entity.other.attribute-name.table.array.toml settings: - foreground: *FUNCTION + foreground: *DEFAULT - name: TOML Keyword scope: @@ -1973,6 +2171,12 @@ tokenColors: settings: foreground: *KEYWORD fontStyle: bold + + - name: TOML Keys Keyword + scope: + - meta.tag.table.toml entity.other.attribute-name.table.toml + settings: + foreground: *RELAX_MD_KEYWORD # ============================================================================= # Java Properties / .ini @@ -1981,7 +2185,7 @@ tokenColors: scope: - source.ini settings: - foreground: *STRING + foreground: *DEFAULT fontStyle: '' - name: ini Properties Keys @@ -2102,6 +2306,10 @@ tokenColors: scope: - variable.language.rust - storage.modifier.mut.rust + - entity.name.type.option.rust + - variable.language.self.rust + - entity.name.type.numeric.rust + - constant.language.bool.rust settings: foreground: *KEYWORD fontStyle: bold @@ -2116,14 +2324,22 @@ tokenColors: - name: Rust Attribute scope: - meta.attribute.rust + - punctuation.definition.attribute.rust settings: foreground: *DECORATOR + - name: Rust String + scope: + - punctuation.definition.string.rust + settings: + foreground: *STRING + - name: Rust Type Params scope: - meta.type_params.rust + - meta.function.definition.rust entity.name.type.rust settings: - foreground: *DEFAULT + foreground: *TYPE_PARAM - name: Rust Trait scope: @@ -2138,9 +2354,10 @@ tokenColors: foreground: *CLASS fontStyle: italic - - name: Rust Class / Enum + - name: Rust Class / Enum / Struct scope: - entity.name.type.rust + - entity.name.type.struct.rust - storage.class.std.rust settings: foreground: *CLASS @@ -2154,12 +2371,25 @@ tokenColors: - name: Rust Lifetime scope: - - entity.name.lifetime.rust + - entity.name.type.lifetime.rust + - punctuation.definition.lifetime.rust - storage.modifier.lifetime.rust settings: foreground: *TYPE_PARAM fontStyle: bold italic + - name: Rust Variable / Parameter + scope: + - variable.other.rust + settings: + foreground: *FUNCTION_PARAM + + - name: Rust Marco Function Call + scope: + - entity.name.function.macro.rust + settings: + foreground: *FUNCTION + fontStyle: italic # ============================================================================= # Angular Template # ============================================================================= @@ -2167,8 +2397,13 @@ tokenColors: scope: - entity.other.ng-binding-name settings: - foreground: *MEMBER_VAR - + foreground: *FUNCTION_PARAM + - name: Angular Binding Punctuation + scope: + - meta.ng-binding punctuation.definition.string.begin.html + - meta.ng-binding punctuation.definition.string.end.html + settings: + foreground: *DEFAULT # ============================================================================= # Vue Template # ============================================================================= @@ -2176,5 +2411,147 @@ tokenColors: scope: - meta.directive.vue - meta.directive.vue entity.other.attribute-name.html + settings: + foreground: *FUNCTION_PARAM + - name: Vue Binding Punctuation + scope: + - meta.directive.vue + - meta.directive.vue source.directive.vue punctuation.definition.string.begin.html + - meta.directive.vue source.directive.vue punctuation.definition.string.end.html + settings: + foreground: *DEFAULT +# ============================================================================= +# Dart +# ============================================================================= + - name: Dart Keyword + scope: + - constant.language.dart + settings: + foreground: *KEYWORD + fontStyle: bold + - name: Dart Class + scope: + - support.class.dart + settings: + foreground: *CLASS + fontStyle: '' + - name: Dart Declaration + scope: + - meta.declaration.dart + settings: + foreground: *DEFAULT + fontStyle: '' + +# ============================================================================= +# Dart +# ============================================================================= + - name: Ruby symbol Hashkey + scope: + - constant.language.symbol.hashkey.ruby settings: foreground: *MEMBER_VAR + fontStyle: '' + + - name: Ruby variable + scope: + - variable.other.readwrite.instance.ruby + settings: + foreground: *FUNCTION_PARAM + fontStyle: '' + + - name: Ruby Global variable + scope: + - variable.other.readwrite.global.ruby + - variable.other.readwrite.global.ruby punctuation.definition.variable.ruby + - variable.other.readwrite.global.pre-defined.ruby + - variable.other.readwrite.global.pre-defined.ruby punctuation.definition.variable.ruby + settings: + foreground: *PREDEFINED + fontStyle: italic + + - name: Ruby Constant + scope: + - variable.other.constant.ruby + settings: + foreground: *PREDEFINED + fontStyle: '' + + - name: Ruby Special Method + scope: + - keyword.other.special-method.ruby + settings: + foreground: *FUNCTION + fontStyle: '' + + - name: Ruby Heredoc + scope: + - string.unquoted.heredoc.ruby punctuation.definition.string.begin.ruby + - string.unquoted.heredoc.ruby punctuation.definition.string.end.ruby + settings: + foreground: *KEYWORD + fontStyle: bold + + - name: Ruby Class + scope: + - variable.other.readwrite.class.ruby + - variable.other.readwrite.class.ruby punctuation.definition.variable.ruby + settings: + foreground: *CLASS + + - name: Ruby Interpolate String + scope: + - string.quoted.other.interpolated.ruby punctuation.section.array.begin.ruby + - string.quoted.other.interpolated.ruby punctuation.section.array.end.ruby + settings: + foreground: *STRING_INTERPOLATION +# ============================================================================= +# Erlang +# ============================================================================= + - name: Elixir Atom + scope: + - variable.other.erlang + - source.erlang constant.other.symbol + settings: + foreground: *MEMBER_VAR + +# ============================================================================= +# Elixir +# ============================================================================= + - name: Elixir Keywords + scope: + - constant.language.elixir + settings: + foreground: *KEYWORD + fontStyle: bold + + - name: Elixir Atom + scope: + - constant.other.symbol.elixir + settings: + foreground: *MEMBER_VAR + + - name: Elixir Language Variable + scope: + - variable.language.elixir + settings: + foreground: *PREDEFINED + + - name: Elixir Module + scope: + - variable.other.readwrite.module.elixir + - variable.other.readwrite.module.elixir punctuation.definition.variable.elixir + settings: + foreground: *DECORATOR + + - name: Elixir Variable + scope: + - source.elixir variable + settings: + foreground: *FUNCTION_PARAM + + - name: Elixir Embedded Source + scope: + - source.elixir.embedded.source + - punctuation.section.embedded.elixir + settings: + foreground: *STRING_INTERPOLATION diff --git a/vscode/test/.vscode/settings.json b/vscode/test/.vscode/settings.json index c67bf33..9a9dc74 100644 --- a/vscode/test/.vscode/settings.json +++ b/vscode/test/.vscode/settings.json @@ -3,6 +3,7 @@ "__locale": "cpp", "__string": "cpp", "string": "cpp", - "string_view": "cpp" + "string_view": "cpp", + "iostream": "cpp" } } \ No newline at end of file diff --git a/vscode/test/sample.css b/vscode/test/sample.css index 1a745f6..52f7125 100644 --- a/vscode/test/sample.css +++ b/vscode/test/sample.css @@ -24,4 +24,6 @@ div > p, p ~ ul, input [type="radio"] { color: red; } -&! \ No newline at end of file +:nth-child(4n) { + color: lime; +} \ No newline at end of file diff --git a/vscode/test/sample.dart b/vscode/test/sample.dart new file mode 100644 index 0000000..8971e0d --- /dev/null +++ b/vscode/test/sample.dart @@ -0,0 +1,134 @@ +// Copyright 2019 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart' show timeDilation; +import 'package:flutter_gen/gen_l10n/gallery_localizations.dart'; +import 'package:flutter_localized_locales/flutter_localized_locales.dart'; +import 'package:gallery/constants.dart'; +import 'package:gallery/data/gallery_options.dart'; +import 'package:gallery/pages/backdrop.dart'; +import 'package:gallery/pages/splash.dart'; +import 'package:gallery/routes.dart'; +import 'package:gallery/themes/gallery_theme_data.dart'; +import 'package:google_fonts/google_fonts.dart'; + +export 'package:gallery/data/demos.dart' show pumpDeferredLibraries; + +void main() { + GoogleFonts.config.allowRuntimeFetching = false; + runApp(const GalleryApp()); +} + +mixin Piloted { + int astronauts = 1; + + void describeCrew() { + print('Number of astronauts: $astronauts'); + } +} + +abstract class Describable { + void describe(); + + void describeWithEmphasis() { + print('========='); + describe(); + print('========='); + } +} + +Future createDescriptions(Iterable objects) async { + for (final object in objects) { + try { + var file = File('$object.txt'); + if (await file.exists()) { + var modified = await file.lastModified(); + print( + 'File for $object already exists. It was modified on $modified.'); + continue; + } + await file.create(); + await file.writeAsString('Start describing $object in this file.'); + } on IOException catch (e) { + print('Cannot create description for $object: $e'); + } + } +} + +class GalleryApp extends StatelessWidget with Piloted { + const GalleryApp({ + Key key, + this.initialRoute, + this.isTestMode = false, + }) : super(key: key); + + final bool isTestMode; + final String initialRoute; + + @override + Widget build(BuildContext context) { + return ModelBinding( + initialModel: GalleryOptions( + themeMode: ThemeMode.system, + textScaleFactor: systemTextScaleFactorOption, + customTextDirection: CustomTextDirection.localeBased, + locale: null, + timeDilation: timeDilation, + platform: defaultTargetPlatform, + isTestMode: isTestMode, + ), + child: Builder( + builder: (context) { + return MaterialApp( + // By default on desktop, scrollbars are applied by the + // ScrollBehavior. This overrides that. All vertical scrollables in + // the gallery need to be audited before enabling this feature, + // see https://github.com/flutter/gallery/issues/523 + scrollBehavior: + const MaterialScrollBehavior().copyWith(scrollbars: false), + restorationScopeId: 'rootGallery', + title: 'Flutter Gallery', + debugShowCheckedModeBanner: false, + themeMode: GalleryOptions.of(context).themeMode, + theme: GalleryThemeData.lightThemeData.copyWith( + platform: GalleryOptions.of(context).platform, + ), + darkTheme: GalleryThemeData.darkThemeData.copyWith( + platform: GalleryOptions.of(context).platform, + ), + localizationsDelegates: const [ + ...GalleryLocalizations.localizationsDelegates, + LocaleNamesLocalizationsDelegate() + ], + initialRoute: initialRoute, + supportedLocales: GalleryLocalizations.supportedLocales, + locale: GalleryOptions.of(context).locale, + localeResolutionCallback: (locale, supportedLocales) { + deviceLocale = locale; + return locale; + }, + onGenerateRoute: RouteConfiguration.onGenerateRoute, + ); + }, + ), + ); + } +} + +class RootPage extends StatelessWidget { + const RootPage({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return const ApplyTextOptions( + child: SplashPage( + child: Backdrop(), + ), + ); + } +} \ No newline at end of file diff --git a/vscode/test/sample.erl b/vscode/test/sample.erl new file mode 100644 index 0000000..940aa41 --- /dev/null +++ b/vscode/test/sample.erl @@ -0,0 +1,27 @@ +%%% Module fact documentation +-module(fact). +-export([fac/1]). + +-record(state, {id, name}). + +-define(MACRO, macro_value). + +-type in() :: ok | hello . +-type out() :: ok | {error, term()}. + +%% Factorial implementation +%% @doc Documentation +fac(0) -> 1; +fac(N) when N > 0, is_integer(N) -> N * fac(N-1). + +string_sample(A) -> "string + second line". + +update_state(State) -> State#state{id=10}. + +-spec simple(in())-> out(). +simple(ok) -> ok. + +use_macro() -> io:format(?MACRO). + +-callback start_service() -> {ok, pid()}. \ No newline at end of file diff --git a/vscode/test/sample.ex b/vscode/test/sample.ex new file mode 100644 index 0000000..c012841 --- /dev/null +++ b/vscode/test/sample.ex @@ -0,0 +1,240 @@ +# Numbers +0b0101011 +1234 ; 0x1A ; 0xbeef ; 0763 ; 0o123 +3.14 ; 5.0e21 ; 0.5e-12 +100_000_000 + +# these are not valid numbers +0b012 ; 0xboar ; 0o888 +0B01 ; 0XAF ; 0O123 + +# Characters +?a ; ?1 ; ?\n ; ?\s ; ?\c ; ? ; ?, +?\x{12} ; ?\x{abcd} +?\x34 ; ?\xF + +# these show that only the first digit is part of the character +?\123 ; ?\12 ; ?\7 + +# Atoms +:this ; :that +:'complex atom' +:"with' \"\" 'quotes" +:" multi + line ' \s \123 \xff +atom" +:... ; :<<>> ; :%{} ; :% ; :{} +:++; :--; :*; :~~~; ::: +:% ; :. ; :<- + +# Strings +"Hello world" +"Interspersed \x{ff} codes \7 \8 \65 \016 and \t\s\\s\z\+ \\ escapes" +"Quotes ' inside \" \123 the \"\" \xF \\xF string \\\" end" +"Multiline + string" + +# Char lists +'this is a list' +'escapes \' \t \\\'' +'Multiline + char + list +' + +# Binaries +<<1, 2, 3>> +<<"hello"::binary, c :: utf8, x:: 4 * 2>> = "hello™1" + +# Sigils +~r/this + i\s "a" regex/ +~R'this + i\s "a" regex too' +~w(hello #{ ["has" <> "123", '\c\d', "\123 interpol" | []] } world)s +~W(hello #{no "123" \c\d \123 interpol} world)s + +~s{Escapes terminators \{ and \}, but no {balancing} # outside of sigil here } + +~S"No escapes \s\t\n and no #{interpolation}" + +:"atoms work #{"to" <> "o"}" + +# Operators +x = 1 + 2.0 * 3 +y = true and false; z = false or true +... = 144 +... == !x && y || z +"hello" |> String.upcase |> String.downcase() +{^z, a} = {true, x} + +# Free operators (added in 1.0.0) +p ~>> f = bind(p, f) +p1 ~> p2 = pair_right(p1, p2) +p1 <~ p2 = pair_left(p1, p2) +p1 <~> p2 = pair_both(p1, p2) +p1 <|> p2 = either(p1, p2) + +# Lists, tuples, maps, keywords +[1, :a, 'hello'] ++ [2, 3] +[:head | [?t, ?a, ?i, ?l]] + +{:one, 2.0, "three"} + +[...: "this", <<>>: "is", %{}: "a keyword", %: "list", {}: "too"] +["this is an atom too": 1, "so is this": 2] +[option: "value", key: :word] +[++: "operator", ~~~: :&&&] + +map = %{shortcut: "syntax"} +%{map | "update" => "me"} +%{ 12 => 13, :weird => ['thing'] } + +# Comprehensions +for x <- 1..10, x < 5, do: {x, x} +pixels = "12345678" +for << <> <- pixels >> do + [r, {g, %{"b" => a}}] +end + +# String interpolation +"String #{inspect "interpolation"} is quite #{1+4+7} difficult" + +# Identifiers +abc_123 = 1 +_018OP = 2 +A__0 == 3 + +# Modules +defmodule Long.Module.Name do + @moduledoc "Simple module docstring" + + @doc """ + Multiline docstring + "with quotes" + and #{ inspect %{"interpolation" => "in" <> "action"} } + now with #{ {:a, 'tuple'} } + and #{ inspect { + :tuple, + %{ with: "nested #{ inspect %{ :interpolation => %{} } }" } + } } + """ + defstruct [:a, :name, :height] + + @doc ~S''' + No #{interpolation} of any kind. + \000 \x{ff} + + \n #{\x{ff}} + ''' + def func(a, b \\ []), do: :ok + + @doc false + def __before_compile__(_) do + :ok + end +end + +# Structs +defmodule Second.Module do + s = %Long.Module.Name{name: "Silly"} + %Long.Module.Name{s | height: {192, :cm}} + ".. #{%Long.Module.Name{s | height: {192, :cm}}} .." +end + +# Types, pseudo-vars, attributes +defmodule M do + @custom_attr :some_constant + + @before_compile Long.Module.Name + + @typedoc "This is a type" + @type typ :: integer + + @typedoc "Type with parameters" + @type parameterized(type_parameter) :: type_parameter + + @typedoc """ + Another type + """ + @opaque typtyp :: 1..10 + + @doc """ + Will be called by M to `func` the `typ` with the `typtyp` + """ + @callback func(typ, typtyp) :: :ok | :fail + + @spec func(typ, typtyp) :: :ok | :fail + def func(a, b) do + a || b || :ok || :fail + Path.expand("..", __DIR__) + IO.inspect __ENV__ + __NOTAPSEUDOVAR__ = 11 + __MODULE__.func(b, a) + end + + defmacro m() do + __CALLER__ + end +end + +# Functions +anon = fn x, y, z -> + fn(a, b, c) -> + &(x + y - z * a / &1 + b + div(&2, c)) + end +end + +&Set.put(&1, &2) ; & Set.put(&1, &2) ; &( Set.put(&1, &1) ) + +# Function calls +anon.(1, 2, 3); self; hd([1,2,3]) +Kernel.spawn(fn -> :ok end) +IO.ANSI.black + +# Control flow +if :this do + :that +else + :otherwise +end + +pid = self +receive do + {:EXIT, _} -> :done + {^pid, :_} -> nil + after 100 -> :no_luck +end + +case __ENV__.line do + x when is__integer(x) -> x + x when x in 1..12 -> -x +end + +cond do + false -> "too bad" + 4 > 5 -> "oops" + true -> nil +end + +# Lexical scope modifiers +import Kernel, except: [spawn: 1, +: 2, /: 2, unless: 2] +alias Long.Module.Name, as: N0men123_and4 +use Bitwise + +4 &&& 5 +2 <<< 3 + +# Protocols +defprotocol Useless do + def func1(this) + def func2(that) +end + +defimpl Useless, for: Atom do +end + +# Exceptions +defmodule NotAnError do + defexception [:message] +end + +raise NotAnError, message: "This is not an error" diff --git a/vscode/test/sample.go b/vscode/test/sample.go index c9dfab0..248e30f 100644 --- a/vscode/test/sample.go +++ b/vscode/test/sample.go @@ -1,6 +1,8 @@ /* * Go highlight sample */ +//go:build (linux || windows) && arm +// +build linux,arm windows,arm // Package main package main @@ -39,6 +41,10 @@ type ( } demoInt int + + type T struct { + FirstName string `json:"first_name" arbitrary text` + } ) const ( @@ -51,11 +57,13 @@ var ( privateVar = 2 ) +// PublicFunc does the thing func PublicFunc() int { localVar := PublicVar return localVar } +// privateFunc does the thing func privateFunc() (int, int) { LocalVar := privateVar return LocalVar, PublicVar diff --git a/vscode/test/sample.java b/vscode/test/sample.java index a51a161..925d96d 100644 --- a/vscode/test/sample.java +++ b/vscode/test/sample.java @@ -27,7 +27,7 @@ public class SomeClass { // some comment * @param param3 */ public SomeClass(AnInterface param1, int[] reassignedParam, - int param2 + int param2, int param3) { int reassignedValue = this.staticField + param2 + param3; long localVar1, localVar2, localVar3, localVar4; diff --git a/vscode/test/sample.js b/vscode/test/sample.js index d88f975..dfebca5 100644 --- a/vscode/test/sample.js +++ b/vscode/test/sample.js @@ -30,7 +30,9 @@ function AjaxRequest(url) { a -= 1 a != 1 - throw new Error({ foo: 'bar' }) + const b = true + + throw new Error({ foo: 'bar', b }) } diff --git a/vscode/test/sample.py b/vscode/test/sample.py index 94ff94d..4573c95 100644 --- a/vscode/test/sample.py +++ b/vscode/test/sample.py @@ -1,3 +1,5 @@ +from typing import List + @decorator(param=1) def f(x): """ Syntax Highlighting Demo diff --git a/vscode/test/sample.rb b/vscode/test/sample.rb new file mode 100644 index 0000000..cef9fc1 --- /dev/null +++ b/vscode/test/sample.rb @@ -0,0 +1,34 @@ +require "test" +CONSTANT = 777 + +# Sample comment + +class Module::Class + include Testcase + + render :action => 'foo' + def foo(parameter) + @parameter = parameter + end + + local_var = eval <<-"FOO";\ + printIndex "Hello world!" + And now this is heredoc! + printIndex "Hello world again!" + FOO + foo("#{$GLOBAL_TIME >> $`} is \Z sample \"string\"" * 777); + if ($1 =~ /sample regular expression/ni) + begin + puts %W(sample words), CONSTANT, :fooo; + do_something :action => "action" + end + expect{counter[0]}.to_be eq 1 + json = { + id: id, + guid: guid, + } + json.merge!(name: profile.name) + 1.upto(@@n) do |index| printIndex 'Hello' + index end + \\\\\\\\\\ + end +end \ No newline at end of file diff --git a/vscode/test/sample.rs b/vscode/test/sample.rs index fdc587b..5b265bc 100644 --- a/vscode/test/sample.rs +++ b/vscode/test/sample.rs @@ -3516,4 +3516,49 @@ mod test_map { } } } + + unsafe fn a_function(count: &mut i64) -> ! { + count += 1; + 'label: loop { + println!("Hello\x20W\u{f3}rld!\u{abcdef}"); + } + } + + fn test() { + unsafe { + a_function(1); + } + } + + #[actix_rt::test] + async fn test_data() { + let srv = init_service( + App::new() + .data(1.0f64) + .data(1usize) + .app_data(web::Data::new('-')) + .service( + web::resource("/test") + .data(10usize) + .app_data(web::Data::new('*')) + .guard(guard::Get()) + .to( + |data1: web::Data, + data2: web::Data, + data3: web::Data| { + assert_eq!(**data1, 10); + assert_eq!(**data2, '*'); + let error = std::f64::EPSILON; + assert!((**data3 - 1.0).abs() < error); + HttpResponse::Ok() + }, + ), + ), + ) + .await; + + let req = TestRequest::get().uri("/test").to_request(); + let resp = call_service(&srv, req).await; + assert_eq!(resp.status(), StatusCode::OK); + } } diff --git a/vscode/test/sample.scss b/vscode/test/sample.scss index 208b397..5610ff7 100644 --- a/vscode/test/sample.scss +++ b/vscode/test/sample.scss @@ -42,6 +42,10 @@ $padding: 1% !default; } } +:nth-child(4n) { + color: lime; +} + @font-face { font-family: DroidSans; src: url(DroidSans.ttf); diff --git a/vscode/test/sample.toml b/vscode/test/sample.toml index 6033938..f060407 100644 --- a/vscode/test/sample.toml +++ b/vscode/test/sample.toml @@ -1,60 +1,32 @@ -# traefik.toml -logLevel = "DEBUG" -defaultEntryPoints = ["http", "https"] -[entryPoints] - [entryPoints.http] - address = ":80" - [entryPoints.http.redirect] - entryPoint = "https" - [entryPoints.https] - address = ":443" - [entryPoints.https.tls] - [[entryPoints.https.tls.certificates]] - CertFile = "integration/fixtures/https/snitest.com.cert" - KeyFile = "integration/fixtures/https/snitest.com.key" - [[entryPoints.https.tls.certificates]] - CertFile = "integration/fixtures/https/snitest.org.cert" - KeyFile = "integration/fixtures/https/snitest.org.key" +# This is a TOML document. -[file] +title = "TOML Example" +description = """ + Multiline + description +""" +date = 2019-11-04T07:32:00-08:00 -# rules -[backends] - [backends.backend1] - [backends.backend1.circuitbreaker] - expression = "NetworkErrorRatio() > 0.5" - [backends.backend1.servers.server1] - url = "http://172.17.0.2:80" - weight = 10 - [backends.backend1.servers.server2] - url = "http://172.17.0.3:80" - weight = 1 - [backends.backend2] - [backends.backend1.maxconn] - amount = 10 - extractorfunc = "request.host" - [backends.backend2.LoadBalancer] - method = "drr" - [backends.backend2.servers.server1] - url = "http://172.17.0.4:80" - weight = 1 - [backends.backend2.servers.server2] - url = "http://172.17.0.5:80" - weight = 2 +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +"connection_max" = 5000 +enabled = true -[frontends] - [frontends.frontend1] - backend = "backend2" - [frontends.frontend1.routes.test_1] - rule = "Host:test.localhost" - [frontends.frontend2] - backend = "backend1" - passHostHeader = true - priority = 10 - entrypoints = ["https"] # overrides defaultEntryPoints - [frontends.frontend2.routes.test_1] - rule = "Host:{subdomain:[a-z]+}.localhost" - [frontends.frontend3] - entrypoints = ["http", "https"] # overrides defaultEntryPoints - backend = "backend2" - rule = "Path:/test" \ No newline at end of file +[servers] +alpha = { ip = '10.0.0.1', dc = "eqdc10" } +beta = { ip = '10.0.0.2', dc = "eqdc10" } + +[clients] +data = [ ["gamma", "delta"], [1.0, 2.0] ] + +hosts = [ + "alpha", + "omega", +] + +valid-escapes = """\tline \"1\" + line\u00202 + line 3\U0000002E +""" +invalid-escapes = "\a \u20 \U0020"