mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-09 00:05:28 +01:00
Merge branch 'master' into fix/33739
This commit is contained in:
+1
-1
@@ -11,6 +11,6 @@ trim_trailing_whitespace = true
|
||||
|
||||
# The indent size used in the `package.json` file cannot be changed
|
||||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
||||
[{.travis.yml,npm-shrinkwrap.json,package.json}]
|
||||
[{*.yml,*.yaml,npm-shrinkwrap.json,package.json}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
+12
-12
@@ -6,40 +6,40 @@
|
||||
accessibility: [],
|
||||
api: [],
|
||||
css-less-sass: [],
|
||||
debug: [ isidorn ],
|
||||
editor: [ alexandrudima ],
|
||||
debug: [ weinand ],
|
||||
editor: [],
|
||||
editor-brackets: [],
|
||||
editor-clipboard: [ rebornix ],
|
||||
editor-clipboard: [],
|
||||
editor-colors: [],
|
||||
editor-contrib: [ rebornix ],
|
||||
editor-contrib: [],
|
||||
editor-core: [],
|
||||
editor-find-widget: [ rebornix ],
|
||||
editor-find-widget: [],
|
||||
editor-folding: [],
|
||||
editor-ime: [ rebornix ],
|
||||
editor-indentation: [ rebornix ],
|
||||
editor-ime: [],
|
||||
editor-indentation: [],
|
||||
editor-input: [],
|
||||
editor-minimap: [],
|
||||
editor-multicursor: [],
|
||||
editor-wrapping: [],
|
||||
emmet: [ ramya-rao-a ],
|
||||
error-list: [],
|
||||
extensions: [],
|
||||
git: [ joaomoreno ],
|
||||
hot-exit: [ Tyriar ],
|
||||
html: [],
|
||||
html: [ aeschli ],
|
||||
i18n: [],
|
||||
install-update: [],
|
||||
integrated-terminal: [ Tyriar ],
|
||||
javascript: [ mjbvz ],
|
||||
json: [],
|
||||
languages basic: [],
|
||||
markdown: [],
|
||||
markdown: [ mjbvz ],
|
||||
merge-conflict: [ chrmarti ],
|
||||
perf-profile: [],
|
||||
php: [ roblourens ],
|
||||
search: [ roblourens ],
|
||||
snippets: [ jrieken ],
|
||||
tasks: [],
|
||||
tasks: [ dbaeumer ],
|
||||
typescript: [ mjbvz ],
|
||||
workbench: [],
|
||||
workbench: [ bpasero, isidorn, sandy081]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
newReleaseLabel: 'new release',
|
||||
newReleases: ['1.15'],
|
||||
perform: true
|
||||
newReleases: ['1.17.2'],
|
||||
perform: false
|
||||
}
|
||||
+15
-7
@@ -5,8 +5,14 @@ os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
webhooks:
|
||||
- http://vscode-test-probot.westus.cloudapp.azure.com:3450/travis/notifications
|
||||
|
||||
addons:
|
||||
apt:
|
||||
@@ -27,24 +33,26 @@ before_install:
|
||||
- git submodule update --init --recursive
|
||||
- git clone --depth 1 https://github.com/creationix/nvm.git ./.nvm
|
||||
- source ./.nvm/nvm.sh
|
||||
- nvm install 7.4.0
|
||||
- nvm use 7.4.0
|
||||
- nvm install 7.9.0
|
||||
- nvm use 7.9.0
|
||||
- npm config set python `which python`
|
||||
- npm install -g gulp
|
||||
- if [ $TRAVIS_OS_NAME == "linux" ]; then
|
||||
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
|
||||
sh -e /etc/init.d/xvfb start;
|
||||
sleep 3;
|
||||
fi
|
||||
# Make npm logs less verbose
|
||||
- npm config set depth 0
|
||||
- npm config set loglevel warn
|
||||
|
||||
install:
|
||||
- ./scripts/npm.sh install
|
||||
|
||||
script:
|
||||
- gulp hygiene --silent
|
||||
- gulp electron --silent
|
||||
- gulp compile --silent --max_old_space_size=4096
|
||||
- gulp optimize-vscode --silent --max_old_space_size=4096
|
||||
- node_modules/.bin/gulp hygiene
|
||||
- node_modules/.bin/gulp electron --silent
|
||||
- node_modules/.bin/gulp compile --silent --max_old_space_size=4096
|
||||
- node_modules/.bin/gulp optimize-vscode --silent --max_old_space_size=4096
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage --reporter dot; else ./scripts/test.sh --reporter dot; fi
|
||||
- ./scripts/test-integration.sh
|
||||
|
||||
|
||||
Vendored
+35
-35
@@ -6,12 +6,12 @@
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Gulp Build",
|
||||
"program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js",
|
||||
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
|
||||
"stopOnEntry": true,
|
||||
"args": [
|
||||
"watch-extension:json-client"
|
||||
],
|
||||
"cwd": "${workspaceRoot}"
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
@@ -21,7 +21,7 @@
|
||||
"port": 5870,
|
||||
"restart": true,
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -31,7 +31,7 @@
|
||||
"protocol": "inspector",
|
||||
"port": 5871,
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -41,7 +41,7 @@
|
||||
"name": "Attach to Search Process",
|
||||
"port": 5876,
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -51,7 +51,7 @@
|
||||
"protocol": "inspector",
|
||||
"port": 5874,
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -61,7 +61,7 @@
|
||||
"protocol": "inspector",
|
||||
"port": 5875,
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -70,12 +70,12 @@
|
||||
"name": "VS Code Emmet Tests",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"${workspaceRoot}/extensions/emmet/test-fixtures",
|
||||
"--extensionDevelopmentPath=${workspaceRoot}/extensions/emmet",
|
||||
"--extensionTestsPath=${workspaceRoot}/extensions/emmet/out/test"
|
||||
"${workspaceFolder}/extensions/emmet/test-fixtures",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}/extensions/emmet",
|
||||
"--extensionTestsPath=${workspaceFolder}/extensions/emmet/out/test"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -84,12 +84,12 @@
|
||||
"name": "VS Code API Tests",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"${workspaceRoot}/extensions/vscode-api-tests/testWorkspace",
|
||||
"--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-api-tests",
|
||||
"--extensionTestsPath=${workspaceRoot}/extensions/vscode-api-tests/out"
|
||||
"${workspaceFolder}/extensions/vscode-api-tests/testWorkspace",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode-api-tests",
|
||||
"--extensionTestsPath=${workspaceFolder}/extensions/vscode-api-tests/out"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -98,12 +98,12 @@
|
||||
"name": "VS Code Tokenizer Tests",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"${workspaceRoot}/extensions/vscode-colorize-tests/test",
|
||||
"--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-colorize-tests",
|
||||
"--extensionTestsPath=${workspaceRoot}/extensions/vscode-colorize-tests/out"
|
||||
"${workspaceFolder}/extensions/vscode-colorize-tests/test",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode-colorize-tests",
|
||||
"--extensionTestsPath=${workspaceFolder}/extensions/vscode-colorize-tests/out"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -117,30 +117,30 @@
|
||||
"request": "launch",
|
||||
"name": "Launch VS Code",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceRoot}/scripts/code.bat"
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.bat"
|
||||
},
|
||||
"osx": {
|
||||
"runtimeExecutable": "${workspaceRoot}/scripts/code.sh"
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh"
|
||||
},
|
||||
"linux": {
|
||||
"runtimeExecutable": "${workspaceRoot}/scripts/code.sh"
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh"
|
||||
},
|
||||
"urlFilter": "*index.html*",
|
||||
"runtimeArgs": [
|
||||
"--inspect=5875"
|
||||
],
|
||||
"webRoot": "${workspaceRoot}"
|
||||
"webRoot": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Git Unit Tests",
|
||||
"protocol": "inspector",
|
||||
"program": "${workspaceRoot}/extensions/git/node_modules/mocha/bin/_mocha",
|
||||
"program": "${workspaceFolder}/extensions/git/node_modules/mocha/bin/_mocha",
|
||||
"stopOnEntry": false,
|
||||
"cwd": "${workspaceRoot}/extensions/git",
|
||||
"cwd": "${workspaceFolder}/extensions/git",
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/extensions/git/out/**/*.js"
|
||||
"${workspaceFolder}/extensions/git/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -148,38 +148,38 @@
|
||||
"request": "launch",
|
||||
"name": "Unit Tests",
|
||||
"protocol": "inspector",
|
||||
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
|
||||
"runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.app/Contents/MacOS/Electron",
|
||||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
||||
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.exe"
|
||||
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.exe"
|
||||
},
|
||||
"linux": {
|
||||
"runtimeExecutable": "${workspaceRoot}/.build/electron/code-oss"
|
||||
"runtimeExecutable": "${workspaceFolder}/.build/electron/code-oss"
|
||||
},
|
||||
"stopOnEntry": false,
|
||||
"args": [
|
||||
"--timeout",
|
||||
"2000"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"ELECTRON_RUN_AS_NODE": "true"
|
||||
},
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Smoke Test",
|
||||
"program": "${workspaceRoot}/test/smoke/out/main.js",
|
||||
"cwd": "${workspaceRoot}/test/smoke",
|
||||
"program": "${workspaceFolder}/test/smoke/out/main.js",
|
||||
"cwd": "${workspaceFolder}/test/smoke",
|
||||
"timeout": 240000,
|
||||
"port": 9999,
|
||||
"args": [
|
||||
"-l",
|
||||
"${workspaceRoot}/.build/electron/Code - OSS.app/Contents/MacOS/Electron"
|
||||
"${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron"
|
||||
],
|
||||
"outFiles": [
|
||||
"${cwd}/out/**/*.js"
|
||||
|
||||
Vendored
+5
-3
@@ -14,7 +14,9 @@
|
||||
"**/node_modules": true,
|
||||
"**/bower_components": true,
|
||||
".build/**": true,
|
||||
"out*/**": true,
|
||||
"out/**": true,
|
||||
"out-build/**": true,
|
||||
"out-vscode/**": true,
|
||||
"i18n/**": true,
|
||||
"extensions/**/out/**": true,
|
||||
"test/smoke/out/**": true
|
||||
@@ -27,9 +29,9 @@
|
||||
"lcov.watch": [
|
||||
{
|
||||
"pattern": "**/*.test.js",
|
||||
"command": "${workspaceRoot}/scripts/test.sh --coverage --run ${file}",
|
||||
"command": "${workspaceFolder}/scripts/test.sh --coverage --run ${file}",
|
||||
"windows": {
|
||||
"command": "${workspaceRoot}\\scripts\\test.bat --coverage --run ${file}"
|
||||
"command": "${workspaceFolder}\\scripts\\test.bat --coverage --run ${file}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Vendored
+3
-3
@@ -33,11 +33,11 @@
|
||||
"task": "tslint",
|
||||
"label": "Run tslint",
|
||||
"problemMatcher": [
|
||||
"$tslint4"
|
||||
"$tslint5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"taskName": "Run tests",
|
||||
"label": "Run tests",
|
||||
"type": "shell",
|
||||
"command": "./scripts/test.sh",
|
||||
"windows": {
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "Run Dev",
|
||||
"label": "Run Dev",
|
||||
"type": "shell",
|
||||
"command": "./scripts/code.sh",
|
||||
"windows": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
a code editor with what developers need for their core edit-build-debug cycle. Code
|
||||
provides comprehensive editing and debugging support, an extensibility model, and lightweight integration with existing tools.
|
||||
|
||||
VS Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on [VS Code's website](https://code.visualstudio.com/Download). To get the latest releases everyday, you can install the [Insiders version of VS Code](https://code.visualstudio.com/insiders). This builds from the master branch and is updated at least daily.
|
||||
VS Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on [VS Code's website](https://code.visualstudio.com/Download). To get the latest releases every day, you can install the [Insiders version of VS Code](https://code.visualstudio.com/insiders). This builds from the master branch and is updated at least daily.
|
||||
|
||||
<p align="center">
|
||||
<img alt="VS Code in action" src="https://cloud.githubusercontent.com/assets/11839736/16642200/6624dde0-43bd-11e6-8595-c81885ba0dc2.png">
|
||||
@@ -30,6 +30,7 @@ please see the document [How to Contribute](https://github.com/Microsoft/vscode/
|
||||
* [The development workflow, including debugging and running tests](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#development-workflow)
|
||||
* [Coding Guidelines](https://github.com/Microsoft/vscode/wiki/Coding-Guidelines)
|
||||
* [Submitting pull requests](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests)
|
||||
* [Contributing to translations](https://aka.ms/vscodeloc)
|
||||
|
||||
Please see also our [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
|
||||
+110
-438
@@ -26,42 +26,41 @@ This project incorporates components from the projects listed below. The origina
|
||||
19. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle)
|
||||
20. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift)
|
||||
21. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)
|
||||
22. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site)
|
||||
23. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar)
|
||||
24. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify)
|
||||
25. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
|
||||
26. language-docker (https://github.com/moby/moby)
|
||||
27. language-go version 0.39.0 (https://github.com/atom/language-go)
|
||||
28. language-less (https://github.com/atom/language-less)
|
||||
29. language-php (https://github.com/atom/language-php)
|
||||
30. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust)
|
||||
31. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython)
|
||||
32. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
|
||||
33. octicons-code version 3.1.0 (https://octicons.github.com)
|
||||
34. octicons-font version 3.1.0 (https://octicons.github.com)
|
||||
35. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
|
||||
36. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
|
||||
37. string_scorer version 0.1.20 (https://github.com/joshaven/string_score)
|
||||
38. sublimehq/Packages (https://github.com/sublimehq/Packages)
|
||||
39. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell)
|
||||
40. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
|
||||
41. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
|
||||
42. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
|
||||
43. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
|
||||
44. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
|
||||
45. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
|
||||
46. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
|
||||
47. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
|
||||
48. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
|
||||
49. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
|
||||
50. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
|
||||
51. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle)
|
||||
22. Ikuyadeu/vscode-R (https://github.com/Ikuyadeu/vscode-R)
|
||||
23. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site)
|
||||
24. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar)
|
||||
25. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify)
|
||||
26. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
|
||||
27. language-docker (https://github.com/moby/moby)
|
||||
28. language-go version 0.39.0 (https://github.com/atom/language-go)
|
||||
29. language-less (https://github.com/atom/language-less)
|
||||
30. language-php (https://github.com/atom/language-php)
|
||||
31. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust)
|
||||
32. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython)
|
||||
33. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
|
||||
34. Microsoft/vscode-mssql (https://github.com/Microsoft/vscode-mssql)
|
||||
35. octicons-code version 3.1.0 (https://octicons.github.com)
|
||||
36. octicons-font version 3.1.0 (https://octicons.github.com)
|
||||
37. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
|
||||
38. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
|
||||
39. sublimehq/Packages (https://github.com/sublimehq/Packages)
|
||||
40. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell)
|
||||
41. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
|
||||
42. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
|
||||
43. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
|
||||
44. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
|
||||
45. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
|
||||
46. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
|
||||
47. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
|
||||
48. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
|
||||
49. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
|
||||
50. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
|
||||
51. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
|
||||
52. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
|
||||
53. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle)
|
||||
54. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle)
|
||||
55. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
|
||||
56. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage)
|
||||
57. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
|
||||
54. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
|
||||
55. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage)
|
||||
56. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
|
||||
|
||||
|
||||
%% atom/language-c NOTICES AND INFORMATION BEGIN HERE
|
||||
@@ -694,6 +693,32 @@ without specific, written prior permission. Title to copyright in this document
|
||||
=========================================
|
||||
END OF HTML 5.1 W3C Working Draft NOTICES AND INFORMATION
|
||||
|
||||
%% Ikuyadeu/vscode-R NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Yuki Ueda
|
||||
|
||||
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.
|
||||
=========================================
|
||||
END OF Ikuyadeu/vscode-R NOTICES AND INFORMATION
|
||||
|
||||
%% Ionic documentation NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright Drifty Co. http://drifty.com/.
|
||||
@@ -1238,187 +1263,46 @@ END OF MagicStack/MagicPython NOTICES AND INFORMATION
|
||||
|
||||
%% Microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Copyright (c) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
MIT License
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
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:
|
||||
|
||||
1. Definitions.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
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.
|
||||
=========================================
|
||||
END OF Microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION
|
||||
|
||||
%% Microsoft/vscode-mssql NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
------------------------------------------ START OF LICENSE -----------------------------------------
|
||||
vscode-mssql
|
||||
Copyright (c) Microsoft Corporation
|
||||
All rights reserved.
|
||||
MIT License
|
||||
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:
|
||||
Copyright (c) 2016 Sanjay Nagamangalam
|
||||
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.
|
||||
----------------------------------------------- END OF LICENSE ------------------------------------------
|
||||
=========================================
|
||||
END OF Microsoft/vscode-mssql NOTICES AND INFORMATION
|
||||
|
||||
%% octicons-code NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
@@ -1587,31 +1471,6 @@ SOFTWARE.
|
||||
=========================================
|
||||
END OF shaders-tmLanguage NOTICES AND INFORMATION
|
||||
|
||||
%% string_scorer NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
This software is released under the MIT license:
|
||||
|
||||
Copyright (c) Joshaven Potter
|
||||
|
||||
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.
|
||||
=========================================
|
||||
END OF string_scorer NOTICES AND INFORMATION
|
||||
|
||||
%% sublimehq/Packages NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) Sublime Packages project authors
|
||||
@@ -1851,19 +1710,6 @@ to the base-name name of the original file, and an extension of txt, html, or si
|
||||
=========================================
|
||||
END OF textmate/perl.tmbundle NOTICES AND INFORMATION
|
||||
|
||||
%% textmate/r.tmbundle NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) textmate-r.tmbundle project authors
|
||||
|
||||
If not otherwise specified (see below), files in this folder fall under the following license:
|
||||
|
||||
Permission to copy, use, modify, sell and distribute this
|
||||
software is granted. This software is provided "as is" without
|
||||
express or implied warranty, and with no claim as to its
|
||||
suitability for any purpose.
|
||||
=========================================
|
||||
END OF textmate/r.tmbundle NOTICES AND INFORMATION
|
||||
|
||||
%% textmate/ruby.tmbundle NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) textmate-ruby.tmbundle project authors
|
||||
@@ -1900,24 +1746,6 @@ to the base-name name of the original file, and an extension of txt, html, or si
|
||||
=========================================
|
||||
END OF textmate/shellscript.tmbundle NOTICES AND INFORMATION
|
||||
|
||||
%% textmate/sql.tmbundle NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) textmate-sql.tmbundle project authors
|
||||
|
||||
If not otherwise specified (see below), files in this folder fall under the following license:
|
||||
|
||||
Permission to copy, use, modify, sell and distribute this
|
||||
software is granted. This software is provided "as is" without
|
||||
express or implied warranty, and with no claim as to its
|
||||
suitability for any purpose.
|
||||
|
||||
An exception is made for files in readable text which contain their own license information,
|
||||
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
|
||||
to the base-name name of the original file, and an extension of txt, html, or similar. For example
|
||||
"tidy" is accompanied by "tidy-license.txt".
|
||||
=========================================
|
||||
END OF textmate/sql.tmbundle NOTICES AND INFORMATION
|
||||
|
||||
%% textmate/yaml.tmbundle NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2015 FichteFoll <fichtefoll2@googlemail.com>
|
||||
@@ -1943,184 +1771,28 @@ END OF textmate/yaml.tmbundle NOTICES AND INFORMATION
|
||||
|
||||
%% TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Copyright (c) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
MIT License
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
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:
|
||||
|
||||
1. Definitions.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
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.
|
||||
=========================================
|
||||
END OF TypeScript-TmLanguage NOTICES AND INFORMATION
|
||||
|
||||
|
||||
+5
-3
@@ -2,14 +2,16 @@ environment:
|
||||
ELECTRON_RUN_AS_NODE: 1
|
||||
VSCODE_BUILD_VERBOSE: true
|
||||
|
||||
cache:
|
||||
- '%APPDATA%\npm-cache'
|
||||
|
||||
install:
|
||||
- ps: Install-Product node 7.4.0 x64
|
||||
- ps: Install-Product node 7.9.0 x64
|
||||
- npm install -g npm@4 --silent
|
||||
- npm install -g gulp mocha --silent
|
||||
|
||||
build_script:
|
||||
- .\scripts\npm.bat install
|
||||
- gulp electron
|
||||
- .\node_modules\.bin\gulp electron
|
||||
- npm run compile
|
||||
|
||||
test_script:
|
||||
|
||||
+38
-24
@@ -12,6 +12,7 @@ const gulptslint = require('gulp-tslint');
|
||||
const gulpeslint = require('gulp-eslint');
|
||||
const tsfmt = require('typescript-formatter');
|
||||
const tslint = require('tslint');
|
||||
const vfs = require('vinyl-fs');
|
||||
|
||||
/**
|
||||
* Hygiene works by creating cascading subsets of all our files and
|
||||
@@ -54,6 +55,7 @@ const indentationFilter = [
|
||||
'!**/*.md',
|
||||
'!**/*.ps1',
|
||||
'!**/*.template',
|
||||
'!**/*.yaml',
|
||||
'!**/*.yml',
|
||||
'!**/lib/**',
|
||||
'!extensions/**/*.d.ts',
|
||||
@@ -93,6 +95,7 @@ const copyrightFilter = [
|
||||
'!**/*.opts',
|
||||
'!**/*.disabled',
|
||||
'!build/**/*.init',
|
||||
'!resources/linux/snap/snapcraft.yaml',
|
||||
'!resources/win32/bin/code.js',
|
||||
'!extensions/markdown/media/tomorrow.css',
|
||||
'!extensions/html/server/src/modes/typescript/*'
|
||||
@@ -120,7 +123,8 @@ const tslintFilter = [
|
||||
'!**/node_modules/**',
|
||||
'!extensions/typescript/test/colorize-fixtures/**',
|
||||
'!extensions/vscode-api-tests/testWorkspace/**',
|
||||
'!extensions/**/*.test.ts'
|
||||
'!extensions/**/*.test.ts',
|
||||
'!extensions/html/server/lib/jquery.d.ts'
|
||||
];
|
||||
|
||||
const copyrightHeader = [
|
||||
@@ -130,19 +134,8 @@ const copyrightHeader = [
|
||||
' *--------------------------------------------------------------------------------------------*/'
|
||||
].join('\n');
|
||||
|
||||
function reportFailures(failures) {
|
||||
failures.forEach(failure => {
|
||||
const name = failure.name || failure.fileName;
|
||||
const position = failure.startPosition;
|
||||
const line = position.lineAndCharacter ? position.lineAndCharacter.line : position.line;
|
||||
const character = position.lineAndCharacter ? position.lineAndCharacter.character : position.character;
|
||||
|
||||
console.error(`${name}:${line + 1}:${character + 1}:${failure.failure}`);
|
||||
});
|
||||
}
|
||||
|
||||
gulp.task('eslint', () => {
|
||||
return gulp.src(all, { base: '.' })
|
||||
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||
.pipe(filter(eslintFilter))
|
||||
.pipe(gulpeslint('src/.eslintrc'))
|
||||
.pipe(gulpeslint.formatEach('compact'))
|
||||
@@ -150,12 +143,12 @@ gulp.task('eslint', () => {
|
||||
});
|
||||
|
||||
gulp.task('tslint', () => {
|
||||
const options = { summarizeFailureOutput: true };
|
||||
const options = { emitError: false };
|
||||
|
||||
return gulp.src(all, { base: '.' })
|
||||
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||
.pipe(filter(tslintFilter))
|
||||
.pipe(gulptslint({ rulesDirectory: 'build/lib/tslint' }))
|
||||
.pipe(gulptslint.report(reportFailures, options));
|
||||
.pipe(gulptslint.report(options));
|
||||
});
|
||||
|
||||
const hygiene = exports.hygiene = (some, options) => {
|
||||
@@ -216,6 +209,17 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
cb(err);
|
||||
});
|
||||
});
|
||||
|
||||
function reportFailures(failures) {
|
||||
failures.forEach(failure => {
|
||||
const name = failure.name || failure.fileName;
|
||||
const position = failure.startPosition;
|
||||
const line = position.lineAndCharacter ? position.lineAndCharacter.line : position.line;
|
||||
const character = position.lineAndCharacter ? position.lineAndCharacter.character : position.character;
|
||||
|
||||
console.error(`${name}:${line + 1}:${character + 1}:${failure.failure}`);
|
||||
});
|
||||
}
|
||||
|
||||
const tsl = es.through(function (file) {
|
||||
const configuration = tslint.Configuration.findConfiguration(null, '.');
|
||||
@@ -233,7 +237,7 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
this.emit('data', file);
|
||||
});
|
||||
|
||||
const result = gulp.src(some || all, { base: '.' })
|
||||
const result = vfs.src(some || all, { base: '.', follow: true, allowEmpty: true })
|
||||
.pipe(filter(f => !f.stat.isDirectory()))
|
||||
.pipe(filter(eolFilter))
|
||||
.pipe(options.skipEOL ? es.through() : eol)
|
||||
@@ -253,8 +257,16 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
.pipe(gulpeslint.formatEach('compact'))
|
||||
.pipe(gulpeslint.failAfterError());
|
||||
|
||||
let count = 0;
|
||||
return es.merge(typescript, javascript)
|
||||
.pipe(es.through(null, function () {
|
||||
.pipe(es.through(function (data) {
|
||||
count++;
|
||||
if (count % 10 === 0) {
|
||||
process.stdout.write('.');
|
||||
}
|
||||
this.emit('data', data);
|
||||
}, function () {
|
||||
process.stdout.write('\n');
|
||||
if (errorCount > 0) {
|
||||
this.emit('error', 'Hygiene failed with ' + errorCount + ' errors. Check \'build/gulpfile.hygiene.js\'.');
|
||||
} else {
|
||||
@@ -263,7 +275,7 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
}));
|
||||
};
|
||||
|
||||
gulp.task('hygiene', () => hygiene());
|
||||
gulp.task('hygiene', () => hygiene(''));
|
||||
|
||||
// this allows us to run hygiene as a git pre-commit hook
|
||||
if (require.main === module) {
|
||||
@@ -296,11 +308,13 @@ if (require.main === module) {
|
||||
.split(/\r?\n/)
|
||||
.filter(l => !!l);
|
||||
|
||||
hygiene(some, { skipEOL: skipEOL }).on('error', err => {
|
||||
console.error();
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
if (some.length > 0) {
|
||||
hygiene(some, { skipEOL: skipEOL }).on('error', err => {
|
||||
console.error();
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
+142
-4
@@ -7,6 +7,8 @@
|
||||
|
||||
const gulp = require('gulp');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const cp = require('child_process');
|
||||
const path = require('path');
|
||||
const es = require('event-stream');
|
||||
const azure = require('gulp-azure-storage');
|
||||
@@ -43,8 +45,8 @@ const nodeModules = ['electron', 'original-fs']
|
||||
// Build
|
||||
|
||||
const builtInExtensions = [
|
||||
{ name: 'ms-vscode.node-debug', version: '1.17.0' },
|
||||
{ name: 'ms-vscode.node-debug2', version: '1.17.0' }
|
||||
{ name: 'ms-vscode.node-debug', version: '1.18.3' },
|
||||
{ name: 'ms-vscode.node-debug2', version: '1.18.4' }
|
||||
];
|
||||
|
||||
const excludedExtensions = [
|
||||
@@ -66,7 +68,7 @@ const vscodeResources = [
|
||||
'out-build/bootstrap-amd.js',
|
||||
'out-build/paths.js',
|
||||
'out-build/vs/**/*.{svg,png,cur,html}',
|
||||
'out-build/vs/base/node/startupTimers.js',
|
||||
'out-build/vs/base/common/performance.js',
|
||||
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh}',
|
||||
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
|
||||
'out-build/vs/workbench/browser/media/*-theme.css',
|
||||
@@ -136,6 +138,7 @@ const config = {
|
||||
role: 'Editor',
|
||||
ostypes: ["TEXT", "utxt", "TUTX", "****"],
|
||||
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
|
||||
utis: ['public.source-code'],
|
||||
iconFile: 'resources/darwin/code_file.icns'
|
||||
}],
|
||||
darwinBundleURLTypes: [{
|
||||
@@ -271,9 +274,10 @@ function packageTask(platform, arch, opts) {
|
||||
const packageJsonStream = gulp.src(['package.json'], { base: '.' })
|
||||
.pipe(json({ name, version }));
|
||||
|
||||
const settingsSearchBuildId = getBuildNumber();
|
||||
const date = new Date().toISOString();
|
||||
const productJsonStream = gulp.src(['product.json'], { base: '.' })
|
||||
.pipe(json({ commit, date, checksums }));
|
||||
.pipe(json({ commit, date, checksums, settingsSearchBuildId }));
|
||||
|
||||
const license = gulp.src(['LICENSES.chromium.html', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.' });
|
||||
|
||||
@@ -297,6 +301,7 @@ function packageTask(platform, arch, opts) {
|
||||
.pipe(util.cleanNodeModule('windows-process-tree', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
||||
.pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js']))
|
||||
.pipe(util.cleanNodeModule('v8-profiler', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js']))
|
||||
.pipe(util.cleanNodeModule('keytar', ['binding.gyp', 'build/**', 'src/**', 'script/**', 'node_modules/**'], ['**/*.node']))
|
||||
.pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**']))
|
||||
.pipe(util.cleanNodeModule('nsfw', ['binding.gyp', 'build/**', 'src/**', 'openpa/**', 'includes/**'], ['**/*.node', '**/*.a']))
|
||||
.pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'README.md', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['build/Release/vsda.node']));
|
||||
@@ -443,3 +448,136 @@ gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => {
|
||||
prefix: commit + '/'
|
||||
}));
|
||||
});
|
||||
|
||||
const allConfigDetailsPath = path.join(os.tmpdir(), 'configuration.json');
|
||||
gulp.task('upload-vscode-configuration', ['generate-vscode-configuration'], () => {
|
||||
const branch = process.env.BUILD_SOURCEBRANCH;
|
||||
if (!branch.endsWith('/master') && !branch.startsWith('release/')) {
|
||||
console.log(`Only runs on master and release branches, not ${branch}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fs.existsSync(allConfigDetailsPath)) {
|
||||
console.error(`configuration file at ${allConfigDetailsPath} does not exist`);
|
||||
return;
|
||||
}
|
||||
|
||||
const settingsSearchBuildId = getBuildNumber();
|
||||
if (!settingsSearchBuildId) {
|
||||
console.error('Failed to compute build number');
|
||||
return;
|
||||
}
|
||||
|
||||
return gulp.src(allConfigDetailsPath)
|
||||
.pipe(azure.upload({
|
||||
account: process.env.AZURE_STORAGE_ACCOUNT,
|
||||
key: process.env.AZURE_STORAGE_ACCESS_KEY,
|
||||
container: 'configuration',
|
||||
prefix: `${settingsSearchBuildId}/${commit}/`
|
||||
}));
|
||||
});
|
||||
|
||||
function getBuildNumber() {
|
||||
const previous = getPreviousVersion(packageJson.version);
|
||||
if (!previous) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
try {
|
||||
const out = cp.execSync(`git rev-list ${previous}..HEAD --count`);
|
||||
const count = parseInt(out.toString());
|
||||
return versionStringToNumber(packageJson.version) * 1e4 + count;
|
||||
} catch (e) {
|
||||
console.error('Could not determine build number: ' + e.toString());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given 1.17.2, return 1.17.1
|
||||
* 1.18.0 => 1.17.2.
|
||||
* 2.0.0 => 1.18.0 (or the highest 1.x)
|
||||
*/
|
||||
function getPreviousVersion(versionStr) {
|
||||
function tagExists(tagName) {
|
||||
try {
|
||||
cp.execSync(`git rev-parse ${tagName}`, { stdio: 'ignore' });
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getLastTagFromBase(semverArr, componentToTest) {
|
||||
const baseVersion = semverArr.join('.');
|
||||
if (!tagExists(baseVersion)) {
|
||||
console.error('Failed to find tag for base version, ' + baseVersion);
|
||||
return null;
|
||||
}
|
||||
|
||||
let goodTag;
|
||||
do {
|
||||
goodTag = semverArr.join('.');
|
||||
semverArr[componentToTest]++;
|
||||
} while (tagExists(semverArr.join('.')));
|
||||
|
||||
return goodTag;
|
||||
}
|
||||
|
||||
const semverArr = versionStr.split('.');
|
||||
if (semverArr[2] > 0) {
|
||||
semverArr[2]--;
|
||||
return semverArr.join('.');
|
||||
} else if (semverArr[1] > 0) {
|
||||
semverArr[1]--;
|
||||
return getLastTagFromBase(semverArr, 2);
|
||||
} else {
|
||||
semverArr[0]--;
|
||||
return getLastTagFromBase(semverArr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function versionStringToNumber(versionStr) {
|
||||
const semverRegex = /(\d+)\.(\d+)\.(\d+)/;
|
||||
const match = versionStr.match(semverRegex);
|
||||
if (!match) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10);
|
||||
}
|
||||
|
||||
gulp.task('generate-vscode-configuration', () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const buildDir = process.env['AGENT_BUILDDIRECTORY'];
|
||||
if (!buildDir) {
|
||||
return reject(new Error('$AGENT_BUILDDIRECTORY not set'));
|
||||
}
|
||||
|
||||
const userDataDir = path.join(os.tmpdir(), 'tmpuserdata');
|
||||
const extensionsDir = path.join(os.tmpdir(), 'tmpextdir');
|
||||
const appPath = path.join(buildDir, 'VSCode-darwin/Visual\\ Studio\\ Code\\ -\\ Insiders.app/Contents/Resources/app/bin/code');
|
||||
const codeProc = cp.exec(`${appPath} --export-default-configuration='${allConfigDetailsPath}' --wait --user-data-dir='${userDataDir}' --extensions-dir='${extensionsDir}'`);
|
||||
|
||||
const timer = setTimeout(() => {
|
||||
codeProc.kill();
|
||||
reject(new Error('export-default-configuration process timed out'));
|
||||
}, 10 * 1000);
|
||||
|
||||
codeProc.stdout.on('data', d => console.log(d.toString()));
|
||||
codeProc.stderr.on('data', d => console.log(d.toString()));
|
||||
|
||||
codeProc.on('exit', () => {
|
||||
clearTimeout(timer);
|
||||
resolve();
|
||||
});
|
||||
|
||||
codeProc.on('error', err => {
|
||||
clearTimeout(timer);
|
||||
reject(err);
|
||||
});
|
||||
}).catch(e => {
|
||||
// Don't fail the build
|
||||
console.error(e.toString());
|
||||
});
|
||||
});
|
||||
|
||||
@@ -55,6 +55,7 @@ function prepareDebPackage(arch) {
|
||||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ICON@@', product.applicationName))
|
||||
.pipe(rename('usr/share/applications/' + product.applicationName + '.desktop'));
|
||||
|
||||
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
|
||||
@@ -131,6 +132,7 @@ function prepareRpmPackage(arch) {
|
||||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ICON@@', product.applicationName))
|
||||
.pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '.desktop'));
|
||||
|
||||
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
|
||||
@@ -178,6 +180,50 @@ function buildRpmPackage(arch) {
|
||||
'cp "' + rpmOut + '/$(ls ' + rpmOut + ')" ' + destination + '/'
|
||||
]);
|
||||
}
|
||||
function getSnapBuildPath(arch) {
|
||||
return `.build/linux/snap/${arch}/${product.applicationName}-${arch}`;
|
||||
}
|
||||
|
||||
function prepareSnapPackage(arch) {
|
||||
const binaryDir = '../VSCode-linux-' + arch;
|
||||
const destination = getSnapBuildPath(arch);
|
||||
|
||||
return function () {
|
||||
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
|
||||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ICON@@', `/usr/share/pixmaps/${product.applicationName}.png`))
|
||||
.pipe(rename(`usr/share/applications/${product.applicationName}.desktop`));
|
||||
|
||||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
.pipe(rename(`usr/share/pixmaps/${product.applicationName}.png`));
|
||||
|
||||
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
||||
.pipe(rename(function (p) { p.dirname = 'usr/share/' + product.applicationName + '/' + p.dirname; }));
|
||||
|
||||
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@VERSION@@', packageJson.version))
|
||||
.pipe(rename('snap/snapcraft.yaml'));
|
||||
|
||||
const electronLaunch = gulp.src('resources/linux/snap/electron-launch', { base: '.' })
|
||||
.pipe(rename('electron-launch'));
|
||||
|
||||
const all = es.merge(desktop, icon, code, snapcraft, electronLaunch);
|
||||
|
||||
return all.pipe(vfs.dest(destination));
|
||||
};
|
||||
}
|
||||
|
||||
function buildSnapPackage(arch) {
|
||||
const snapBuildPath = getSnapBuildPath(arch);
|
||||
|
||||
return shell.task([
|
||||
`chmod +x ${snapBuildPath}/electron-launch`,
|
||||
`cd ${snapBuildPath} && snapcraft snap`
|
||||
]);
|
||||
}
|
||||
|
||||
function getFlatpakArch(arch) {
|
||||
return { x64: 'x86_64', ia32: 'i386', arm: 'arm' }[arch];
|
||||
@@ -258,6 +304,12 @@ gulp.task('clean-vscode-linux-arm-deb', util.rimraf('.build/linux/deb/armhf'));
|
||||
gulp.task('clean-vscode-linux-ia32-rpm', util.rimraf('.build/linux/rpm/i386'));
|
||||
gulp.task('clean-vscode-linux-x64-rpm', util.rimraf('.build/linux/rpm/x86_64'));
|
||||
gulp.task('clean-vscode-linux-arm-rpm', util.rimraf('.build/linux/rpm/armhf'));
|
||||
gulp.task('clean-vscode-linux-ia32-snap', util.rimraf('.build/linux/snap/x64'));
|
||||
gulp.task('clean-vscode-linux-x64-snap', util.rimraf('.build/linux/snap/x64'));
|
||||
gulp.task('clean-vscode-linux-arm-snap', util.rimraf('.build/linux/snap/x64'));
|
||||
gulp.task('clean-vscode-linux-ia32-flatpak', util.rimraf('.build/linux/flatpak/i386'));
|
||||
gulp.task('clean-vscode-linux-x64-flatpak', util.rimraf('.build/linux/flatpak/x86_64'));
|
||||
gulp.task('clean-vscode-linux-arm-flatpak', util.rimraf('.build/linux/flatpak/arm'));
|
||||
|
||||
gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb'], prepareDebPackage('ia32'));
|
||||
gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb'], prepareDebPackage('x64'));
|
||||
@@ -273,14 +325,16 @@ gulp.task('vscode-linux-ia32-build-rpm', ['vscode-linux-ia32-prepare-rpm'], buil
|
||||
gulp.task('vscode-linux-x64-build-rpm', ['vscode-linux-x64-prepare-rpm'], buildRpmPackage('x64'));
|
||||
gulp.task('vscode-linux-arm-build-rpm', ['vscode-linux-arm-prepare-rpm'], buildRpmPackage('arm'));
|
||||
|
||||
gulp.task('clean-vscode-linux-ia32-flatpak', util.rimraf('.build/linux/flatpak/i386'));
|
||||
gulp.task('clean-vscode-linux-x64-flatpak', util.rimraf('.build/linux/flatpak/x86_64'));
|
||||
gulp.task('clean-vscode-linux-arm-flatpak', util.rimraf('.build/linux/flatpak/arm'));
|
||||
gulp.task('vscode-linux-ia32-prepare-snap', ['clean-vscode-linux-ia32-snap'], prepareSnapPackage('ia32'));
|
||||
gulp.task('vscode-linux-x64-prepare-snap', ['clean-vscode-linux-x64-snap'], prepareSnapPackage('x64'));
|
||||
gulp.task('vscode-linux-arm-prepare-snap', ['clean-vscode-linux-arm-snap'], prepareSnapPackage('arm'));
|
||||
gulp.task('vscode-linux-ia32-build-snap', ['vscode-linux-ia32-prepare-snap'], buildSnapPackage('ia32'));
|
||||
gulp.task('vscode-linux-x64-build-snap', ['vscode-linux-x64-prepare-snap'], buildSnapPackage('x64'));
|
||||
gulp.task('vscode-linux-arm-build-snap', ['vscode-linux-arm-prepare-snap'], buildSnapPackage('arm'));
|
||||
|
||||
gulp.task('vscode-linux-ia32-prepare-flatpak', ['clean-vscode-linux-ia32-flatpak'], prepareFlatpak('ia32'));
|
||||
gulp.task('vscode-linux-x64-prepare-flatpak', ['clean-vscode-linux-x64-flatpak'], prepareFlatpak('x64'));
|
||||
gulp.task('vscode-linux-arm-prepare-flatpak', ['clean-vscode-linux-arm-flatpak'], prepareFlatpak('arm'));
|
||||
|
||||
gulp.task('vscode-linux-ia32-flatpak', ['vscode-linux-ia32-prepare-flatpak'], buildFlatpak('ia32'));
|
||||
gulp.task('vscode-linux-x64-flatpak', ['vscode-linux-x64-prepare-flatpak'], buildFlatpak('x64'));
|
||||
gulp.task('vscode-linux-arm-flatpak', ['vscode-linux-arm-prepare-flatpak'], buildFlatpak('arm'));
|
||||
|
||||
@@ -130,10 +130,6 @@
|
||||
"name": "vs/workbench/parts/update",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/parts/views",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/parts/watermark",
|
||||
"project": "vscode-workbench"
|
||||
@@ -190,9 +186,17 @@
|
||||
"name": "vs/workbench/services/textMate",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/workspace",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/decorations",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "setup_messages",
|
||||
"project": "vscode-workbench"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var ts = require("typescript");
|
||||
var Lint = require("tslint");
|
||||
var Rule = /** @class */ (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Rule.prototype.apply = function (sourceFile) {
|
||||
var allowed = this.getOptions().ruleArguments[0];
|
||||
return this.applyWithWalker(new AsyncRuleWalker(sourceFile, this.getOptions(), allowed));
|
||||
};
|
||||
return Rule;
|
||||
}(Lint.Rules.AbstractRule));
|
||||
exports.Rule = Rule;
|
||||
var AsyncRuleWalker = /** @class */ (function (_super) {
|
||||
__extends(AsyncRuleWalker, _super);
|
||||
function AsyncRuleWalker(file, opts, allowed) {
|
||||
var _this = _super.call(this, file, opts) || this;
|
||||
_this.allowed = allowed;
|
||||
return _this;
|
||||
}
|
||||
AsyncRuleWalker.prototype.visitMethodDeclaration = function (node) {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
};
|
||||
AsyncRuleWalker.prototype.visitFunctionDeclaration = function (node) {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
};
|
||||
AsyncRuleWalker.prototype.visitFunctionLikeDeclaration = function (node) {
|
||||
var _this = this;
|
||||
var flags = ts.getCombinedModifierFlags(node);
|
||||
if (!(flags & ts.ModifierFlags.Async)) {
|
||||
return;
|
||||
}
|
||||
var path = node.getSourceFile().path;
|
||||
var pathParts = path.split(/\\|\//);
|
||||
if (pathParts.some(function (part) { return _this.allowed.some(function (allowed) { return part === allowed; }); })) {
|
||||
return;
|
||||
}
|
||||
var message = "You are not allowed to use async function in this layer. Allowed layers are: [" + this.allowed + "]";
|
||||
this.addFailureAtNode(node, message);
|
||||
};
|
||||
return AsyncRuleWalker;
|
||||
}(Lint.RuleWalker));
|
||||
@@ -1,47 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as ts from 'typescript';
|
||||
import * as Lint from 'tslint';
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
const allowed = this.getOptions().ruleArguments[0] as string[];
|
||||
return this.applyWithWalker(new AsyncRuleWalker(sourceFile, this.getOptions(), allowed));
|
||||
}
|
||||
}
|
||||
|
||||
class AsyncRuleWalker extends Lint.RuleWalker {
|
||||
|
||||
constructor(file: ts.SourceFile, opts: Lint.IOptions, private allowed: string[]) {
|
||||
super(file, opts);
|
||||
}
|
||||
|
||||
protected visitMethodDeclaration(node: ts.MethodDeclaration): void {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
}
|
||||
|
||||
protected visitFunctionDeclaration(node: ts.FunctionDeclaration): void {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
}
|
||||
|
||||
private visitFunctionLikeDeclaration(node: ts.FunctionLikeDeclaration) {
|
||||
const flags = ts.getCombinedModifierFlags(node);
|
||||
|
||||
if (!(flags & ts.ModifierFlags.Async)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const path = (node.getSourceFile() as any).path;
|
||||
const pathParts = path.split(/\\|\//);
|
||||
|
||||
if (pathParts.some(part => this.allowed.some(allowed => part === allowed))) {
|
||||
return;
|
||||
}
|
||||
|
||||
const message = `You are not allowed to use async function in this layer. Allowed layers are: [${this.allowed}]`;
|
||||
this.addFailureAtNode(node, message);
|
||||
}
|
||||
}
|
||||
@@ -88,10 +88,11 @@ var NoUnexternalizedStringsRuleWalker = /** @class */ (function (_super) {
|
||||
var info = this.findDescribingParent(node);
|
||||
// Ignore strings in import and export nodes.
|
||||
if (info && info.isImport && doubleQuoted) {
|
||||
this.addFailureAtNode(node, NoUnexternalizedStringsRuleWalker.ImportFailureMessage, new Lint.Fix(NoUnexternalizedStringsRuleWalker.ImportFailureMessage, [
|
||||
this.createReplacement(node.getStart(), 1, '\''),
|
||||
this.createReplacement(node.getStart() + text.length - 1, 1, '\''),
|
||||
]));
|
||||
var fix = [
|
||||
Lint.Replacement.replaceFromTo(node.getStart(), 1, '\''),
|
||||
Lint.Replacement.replaceFromTo(node.getStart() + text.length - 1, 1, '\''),
|
||||
];
|
||||
this.addFailureAtNode(node, NoUnexternalizedStringsRuleWalker.ImportFailureMessage, fix);
|
||||
return;
|
||||
}
|
||||
var callInfo = info ? info.callInfo : null;
|
||||
@@ -101,8 +102,9 @@ var NoUnexternalizedStringsRuleWalker = /** @class */ (function (_super) {
|
||||
}
|
||||
if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) {
|
||||
var s = node.getText();
|
||||
var replacement = new Lint.Replacement(node.getStart(), node.getWidth(), "nls.localize('KEY-" + s.substring(1, s.length - 1) + "', " + s + ")");
|
||||
var fix = new Lint.Fix('Unexternalitzed string', [replacement]);
|
||||
var fix = [
|
||||
Lint.Replacement.replaceFromTo(node.getStart(), node.getWidth(), "nls.localize('KEY-" + s.substring(1, s.length - 1) + "', " + s + ")"),
|
||||
];
|
||||
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Unexternalized string found: " + node.getText(), fix));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,13 +104,14 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker {
|
||||
let info = this.findDescribingParent(node);
|
||||
// Ignore strings in import and export nodes.
|
||||
if (info && info.isImport && doubleQuoted) {
|
||||
const fix = [
|
||||
Lint.Replacement.replaceFromTo(node.getStart(), 1, '\''),
|
||||
Lint.Replacement.replaceFromTo(node.getStart() + text.length - 1, 1, '\''),
|
||||
];
|
||||
this.addFailureAtNode(
|
||||
node,
|
||||
NoUnexternalizedStringsRuleWalker.ImportFailureMessage,
|
||||
new Lint.Fix(NoUnexternalizedStringsRuleWalker.ImportFailureMessage, [
|
||||
this.createReplacement(node.getStart(), 1, '\''),
|
||||
this.createReplacement(node.getStart() + text.length - 1, 1, '\''),
|
||||
])
|
||||
fix
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -122,8 +123,9 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker {
|
||||
|
||||
if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) {
|
||||
const s = node.getText();
|
||||
const replacement = new Lint.Replacement(node.getStart(), node.getWidth(), `nls.localize('KEY-${s.substring(1, s.length - 1)}', ${s})`);
|
||||
const fix = new Lint.Fix('Unexternalitzed string', [replacement]);
|
||||
const fix = [
|
||||
Lint.Replacement.replaceFromTo(node.getStart(), node.getWidth(), `nls.localize('KEY-${s.substring(1, s.length - 1)}', ${s})`),
|
||||
];
|
||||
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Unexternalized string found: ${node.getText()}`, fix));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -19,14 +19,15 @@ function handleDeletions() {
|
||||
|
||||
let watch = void 0;
|
||||
|
||||
if (!process.env['VSCODE_USE_LEGACY_WATCH']) {
|
||||
try {
|
||||
watch = require('./watch-nsfw');
|
||||
} catch (err) {
|
||||
console.warn('Could not load our cross platform file watcher: ' + err.toString());
|
||||
console.warn('Falling back to our platform specific watcher...');
|
||||
}
|
||||
}
|
||||
// Disabled due to https://github.com/Microsoft/vscode/issues/36214
|
||||
// if (!process.env['VSCODE_USE_LEGACY_WATCH']) {
|
||||
// try {
|
||||
// watch = require('./watch-nsfw');
|
||||
// } catch (err) {
|
||||
// console.warn('Could not load our cross platform file watcher: ' + err.toString());
|
||||
// console.warn('Falling back to our platform specific watcher...');
|
||||
// }
|
||||
// }
|
||||
|
||||
if (!watch) {
|
||||
watch = process.platform === 'win32' ? require('./watch-win32') : require('gulp-watch');
|
||||
|
||||
@@ -34,7 +34,7 @@ declare module monaco {
|
||||
|
||||
#include(vs/base/common/winjs.base.d.ts): TValueCallback, ProgressCallback, Promise
|
||||
#include(vs/base/common/cancellation): CancellationTokenSource, CancellationToken
|
||||
#include(vs/base/common/uri): URI
|
||||
#include(vs/base/common/uri): URI, UriComponents
|
||||
#include(vs/editor/common/standalone/standaloneBase): KeyCode, KeyMod
|
||||
#include(vs/base/common/htmlContent): IMarkdownString
|
||||
#include(vs/base/browser/keyboardEvent): IKeyboardEvent
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
"url": "https://github.com/Microsoft/vscode/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/minimist": "^1.2.0",
|
||||
"@types/mocha": "^2.2.39",
|
||||
"@types/semver": "^5.3.30",
|
||||
"@types/sinon": "^1.16.34",
|
||||
"@types/minimist": "1.2.0",
|
||||
"@types/mocha": "2.2.39",
|
||||
"@types/semver": "5.3.30",
|
||||
"@types/sinon": "1.16.34",
|
||||
"debounce": "^1.0.0",
|
||||
"eslint": "^3.4.0",
|
||||
"event-stream": "^3.1.7",
|
||||
@@ -48,7 +48,7 @@
|
||||
"sinon": "^1.17.2",
|
||||
"source-map": "^0.4.4",
|
||||
"tslint": "^4.3.1",
|
||||
"typescript": "2.5.2",
|
||||
"typescript": "2.6.1",
|
||||
"typescript-formatter": "4.0.1",
|
||||
"underscore": "^1.8.2",
|
||||
"vinyl": "^0.4.5",
|
||||
|
||||
@@ -54,7 +54,7 @@ const extensions = [
|
||||
'scss',
|
||||
'shaderlab',
|
||||
'shellscript',
|
||||
// 'sql', customized, PRs pending
|
||||
'sql',
|
||||
'swift',
|
||||
'typescript',
|
||||
'vb',
|
||||
|
||||
@@ -22,7 +22,7 @@ function getOptions(urlString) {
|
||||
headers: {
|
||||
'User-Agent': 'NodeJS'
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function download(url, redirectCount) {
|
||||
@@ -100,7 +100,9 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) {
|
||||
result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
|
||||
}
|
||||
for (let key in grammar) {
|
||||
result[key] = grammar[key];
|
||||
if (!result.hasOwnProperty(key)) {
|
||||
result[key] = grammar[key];
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -116,7 +118,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) {
|
||||
});
|
||||
|
||||
}, console.error);
|
||||
}
|
||||
};
|
||||
|
||||
if (path.basename(process.argv[1]) === 'update-grammar.js') {
|
||||
for (var i = 3; i < process.argv.length; i += 2) {
|
||||
|
||||
+7
-7
@@ -2,18 +2,18 @@
|
||||
"name": "code-oss-dev-build",
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"@types/azure": "^0.9.18",
|
||||
"@types/documentdb": "^1.10.1",
|
||||
"@types/es6-collections": "^0.5.30",
|
||||
"@types/es6-promise": "0.0.32",
|
||||
"@types/azure": "0.9.19",
|
||||
"@types/documentdb": "1.10.2",
|
||||
"@types/es6-collections": "0.5.31",
|
||||
"@types/es6-promise": "0.0.33",
|
||||
"@types/mime": "0.0.29",
|
||||
"@types/node": "^7.0.13",
|
||||
"@types/xml2js": "^0.0.33",
|
||||
"@types/node": "8.0.33",
|
||||
"@types/xml2js": "0.0.33",
|
||||
"azure-storage": "^2.1.0",
|
||||
"documentdb": "^1.11.0",
|
||||
"mime": "^1.3.4",
|
||||
"minimist": "^1.2.0",
|
||||
"typescript": "2.5.2",
|
||||
"typescript": "2.6.1",
|
||||
"xml2js": "^0.4.17"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
+14
-14
@@ -52,20 +52,20 @@ function isBuildSigned(quality: string, commit: string): Promise<boolean> {
|
||||
});
|
||||
}
|
||||
|
||||
async function waitForSignedBuild(quality: string, commit: string): Promise<void> {
|
||||
let retries = 0;
|
||||
// async function waitForSignedBuild(quality: string, commit: string): Promise<void> {
|
||||
// let retries = 0;
|
||||
|
||||
while (retries < 180) {
|
||||
if (await isBuildSigned(quality, commit)) {
|
||||
return;
|
||||
}
|
||||
// while (retries < 180) {
|
||||
// if (await isBuildSigned(quality, commit)) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
await new Promise<void>(c => setTimeout(c, 10000));
|
||||
retries++;
|
||||
}
|
||||
// await new Promise<void>(c => setTimeout(c, 10000));
|
||||
// retries++;
|
||||
// }
|
||||
|
||||
throw new Error('Timed out waiting for signed build');
|
||||
}
|
||||
// throw new Error('Timed out waiting for signed build');
|
||||
// }
|
||||
|
||||
async function main(quality: string): Promise<void> {
|
||||
const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim();
|
||||
@@ -73,10 +73,10 @@ async function main(quality: string): Promise<void> {
|
||||
console.log(`Queueing signing request for '${quality}/${commit}'...`);
|
||||
await queueSigningRequest(quality, commit);
|
||||
|
||||
console.log('Waiting on signed build...');
|
||||
await waitForSignedBuild(quality, commit);
|
||||
// console.log('Waiting on signed build...');
|
||||
// await waitForSignedBuild(quality, commit);
|
||||
|
||||
console.log('Found signed build!');
|
||||
// console.log('Found signed build!');
|
||||
}
|
||||
|
||||
main(process.argv[2]).catch(err => {
|
||||
|
||||
@@ -68,6 +68,7 @@ interface Asset {
|
||||
mooncakeUrl: string;
|
||||
hash: string;
|
||||
sha256hash: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
function createOrUpdate(commit: string, quality: string, platform: string, type: string, release: NewDocument, asset: Asset, isUpdate: boolean): Promise<void> {
|
||||
@@ -156,7 +157,7 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
|
||||
console.log('Publishing...');
|
||||
console.log('Quality:', quality);
|
||||
console.log('Platforn:', platform);
|
||||
console.log('Platform:', platform);
|
||||
console.log('Type:', type);
|
||||
console.log('Name:', name);
|
||||
console.log('Version:', version);
|
||||
@@ -165,6 +166,11 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
console.log('Is Released:', isReleased);
|
||||
console.log('File:', file);
|
||||
|
||||
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
|
||||
const size = stat.size;
|
||||
|
||||
console.log('Size:', size);
|
||||
|
||||
const stream = fs.createReadStream(file);
|
||||
const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]);
|
||||
|
||||
@@ -224,7 +230,8 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
||||
mooncakeUrl: `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}`,
|
||||
hash: sha1hash,
|
||||
sha256hash
|
||||
sha256hash,
|
||||
size
|
||||
};
|
||||
|
||||
const release = {
|
||||
|
||||
@@ -37,5 +37,19 @@ step "Run unit tests" \
|
||||
step "Run integration tests" \
|
||||
./scripts/test-integration.sh
|
||||
|
||||
# function smoketest {
|
||||
# ARTIFACTS="$AGENT_BUILDDIRECTORY/smoketest-artifacts"
|
||||
# rm -rf $ARTIFACTS
|
||||
|
||||
# [[ "$VSCODE_QUALITY" == "insider" ]] && VSCODE_APPNAME="Visual Studio Code - Insiders" || VSCODE_APPNAME="Visual Studio Code"
|
||||
# npm run smoketest -- --build "$AGENT_BUILDDIRECTORY/VSCode-darwin/$VSCODE_APPNAME.app" --log $ARTIFACTS
|
||||
# }
|
||||
|
||||
# step "Run smoke test" \
|
||||
# smoketest
|
||||
|
||||
step "Publish release" \
|
||||
./build/tfs/darwin/release.sh
|
||||
|
||||
step "Generate and upload configuration.json" \
|
||||
npm run gulp -- upload-vscode-configuration
|
||||
|
||||
@@ -20,7 +20,7 @@ rm -rf $UNSIGNEDZIP
|
||||
zip -r -X -y $UNSIGNEDZIP *)
|
||||
|
||||
step "Upload unsigned archive" \
|
||||
node build/tfs/common/publish.js --upload-only $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP
|
||||
node build/tfs/common/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP
|
||||
|
||||
step "Sign build" \
|
||||
node build/tfs/common/enqueue.js $VSCODE_QUALITY
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./build/tfs/common/node.sh
|
||||
. ./scripts/env.sh
|
||||
. ./build/tfs/common/common.sh
|
||||
|
||||
export VSCODE_MIXIN_PASSWORD="$1"
|
||||
VSO_PAT="$2"
|
||||
|
||||
echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc
|
||||
|
||||
step "Install dependencies" \
|
||||
npm install
|
||||
|
||||
step "Mix in repository from vscode-distro" \
|
||||
npm run gulp -- mixin
|
||||
|
||||
step "Install distro dependencies" \
|
||||
node build/tfs/common/installDistro.js
|
||||
|
||||
step "Build minified & upload source maps" \
|
||||
npm run gulp -- vscode-darwin-min
|
||||
|
||||
step "Run smoke test" \
|
||||
pushd test/smoke
|
||||
npm install
|
||||
npm run smoketest -- --build "$AGENT_BUILDDIRECTORY/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/MacOS/Electron"
|
||||
popd
|
||||
@@ -1 +1,2 @@
|
||||
pat
|
||||
pat
|
||||
*.js
|
||||
@@ -39,5 +39,22 @@ step "Build minified" \
|
||||
step "Run unit tests" \
|
||||
./scripts/test.sh --build --reporter dot
|
||||
|
||||
# function smoketest {
|
||||
# id -u testuser &>/dev/null || (useradd -m testuser; chpasswd <<< testuser:testpassword)
|
||||
# sudo -i -u testuser -- sh -c 'git config --global user.name "VS Code Agent" && git config --global user.email "monacotools@microsoft.com"'
|
||||
|
||||
# ARTIFACTS="$AGENT_BUILDDIRECTORY/smoketest-artifacts"
|
||||
# rm -rf $ARTIFACTS
|
||||
# mkdir -p $ARTIFACTS
|
||||
# chown -R testuser $ARTIFACTS
|
||||
|
||||
# ps -o pid= -u testuser | xargs sudo kill -9
|
||||
# DISPLAY=:10 sudo -i -u testuser -- sh -c "cd $BUILD_SOURCESDIRECTORY/test/smoke && ./node_modules/.bin/mocha --build $AGENT_BUILDDIRECTORY/VSCode-linux-$ARCH --log $ARTIFACTS"
|
||||
# # DISPLAY=:10 sudo -i -u testuser -- sh -c "cd /vso/work/1/s/test/smoke && ./node_modules/.bin/mocha --build /vso/work/1/VSCode-linux-ia32"
|
||||
# }
|
||||
|
||||
# step "Run smoke test" \
|
||||
# smoketest
|
||||
|
||||
step "Publish release" \
|
||||
./build/tfs/linux/release.sh
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { DocumentClient } from 'documentdb';
|
||||
|
||||
interface Config {
|
||||
id: string;
|
||||
frozen: boolean;
|
||||
}
|
||||
|
||||
function createDefaultConfig(quality: string): Config {
|
||||
return {
|
||||
id: quality,
|
||||
frozen: false
|
||||
};
|
||||
}
|
||||
|
||||
function getConfig(quality: string): Promise<Config> {
|
||||
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const collection = 'dbs/builds/colls/config';
|
||||
const query = {
|
||||
query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`,
|
||||
parameters: [
|
||||
{ name: '@quality', value: quality }
|
||||
]
|
||||
};
|
||||
|
||||
return new Promise<Config>((c, e) => {
|
||||
client.queryDocuments(collection, query).toArray((err, results) => {
|
||||
if (err && err.code !== 409) { return e(err); }
|
||||
|
||||
c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0] as any as Config);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getConfig(process.argv[2])
|
||||
.then(c => console.log(c.frozen), e => console.error(e));
|
||||
@@ -40,6 +40,9 @@ ADD xvfb.init /etc/init.d/xvfb
|
||||
RUN chmod +x /etc/init.d/xvfb
|
||||
RUN update-rc.d xvfb defaults
|
||||
|
||||
# dbus
|
||||
RUN ln -sf /bin/dbus-daemon /usr/bin/dbus-daemon
|
||||
|
||||
# nvm
|
||||
ENV NVM_DIR /usr/local/nvm
|
||||
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
|
||||
@@ -47,4 +50,4 @@ RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | b
|
||||
# for libsecret
|
||||
ENV PKG_CONFIG_PATH /usr/lib/i386-linux-gnu/pkgconfig
|
||||
|
||||
CMD (service xvfb start; export DISPLAY=:10; ./start.sh)
|
||||
CMD (service xvfb start; service dbus start; export DISPLAY=:10; ./start.sh)
|
||||
@@ -9,6 +9,9 @@ step "Build Debian package" \
|
||||
step "Build RPM package" \
|
||||
npm run gulp -- "vscode-linux-$ARCH-build-rpm"
|
||||
|
||||
# step "Build snap package" \
|
||||
# npm run gulp -- "vscode-linux-$ARCH-build-snap"
|
||||
|
||||
(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \
|
||||
step "Install build dependencies" \
|
||||
npm install --unsafe-perm)
|
||||
@@ -49,8 +52,15 @@ RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
|
||||
step "Publish RPM package" \
|
||||
node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH
|
||||
|
||||
# SNAP_FILENAME="$(ls $REPO/.build/linux/snap/$ARCH/ | grep .snap)"
|
||||
# SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME"
|
||||
|
||||
IS_FROZEN="$(node build/tfs/linux/frozen-check.js $VSCODE_QUALITY)"
|
||||
|
||||
if [ -z "$VSCODE_QUALITY" ]; then
|
||||
echo "VSCODE_QUALITY is not set, skipping repo package publish"
|
||||
elif [ "$IS_FROZEN" = "true" ]; then
|
||||
echo "$VSCODE_QUALITY is frozen, skipping repo package publish"
|
||||
else
|
||||
if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then
|
||||
if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
# This is a VERY basic script for Create/Delete operations on repos and packages
|
||||
#
|
||||
#
|
||||
cmd=$1
|
||||
urls=urls.txt
|
||||
defaultPackageFile=new_package.json
|
||||
@@ -53,7 +53,7 @@ function ParseConfigFile {
|
||||
fi
|
||||
BailIfFileMissing "$configFile"
|
||||
secretContents=$(cat "$configFile")
|
||||
|
||||
|
||||
server=$(ParseFromJson .server)
|
||||
protocol=$(ParseFromJson .protocol)
|
||||
port=$(ParseFromJson .port)
|
||||
@@ -135,14 +135,14 @@ function AddPackageByUrl
|
||||
rm -f $tmpFile $tmpOut
|
||||
Bail "File is not a valid deb/rpm package $url"
|
||||
fi
|
||||
|
||||
|
||||
rm -f $tmpFile $tmpOut
|
||||
if [ -z "$pkgName" ]; then
|
||||
Bail "Unable to parse package name for $url"
|
||||
elif [ -z "$pkgVer" ]; then
|
||||
Bail "Unable to parse package version number for $url"
|
||||
fi
|
||||
|
||||
|
||||
# Create Package .json file
|
||||
escapedUrl=$(echo "$url" | sed 's/\//\\\//g' | sed 's/\&/\\\&/g')
|
||||
cp $defaultPackageFile.template $defaultPackageFile
|
||||
@@ -153,7 +153,7 @@ function AddPackageByUrl
|
||||
# Perform Upload
|
||||
AddPackage $defaultPackageFile
|
||||
# Cleanup
|
||||
rm -f $defaultPackageFile
|
||||
rm -f $defaultPackageFile
|
||||
}
|
||||
|
||||
# Upload multiple packages by reading urls line-by-line from the specified file
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
. ./build/tfs/common/node.sh
|
||||
. ./scripts/env.sh
|
||||
. ./build/tfs/common/common.sh
|
||||
|
||||
export ARCH="$1"
|
||||
export VSCODE_MIXIN_PASSWORD="$2"
|
||||
VSO_PAT="$3"
|
||||
|
||||
echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc
|
||||
|
||||
step "Install dependencies" \
|
||||
npm install --arch=$ARCH --unsafe-perm
|
||||
|
||||
step "Mix in repository from vscode-distro" \
|
||||
npm run gulp -- mixin
|
||||
|
||||
step "Get Electron" \
|
||||
npm run gulp -- "electron-$ARCH"
|
||||
|
||||
step "Install distro dependencies" \
|
||||
node build/tfs/common/installDistro.js --arch=$ARCH
|
||||
|
||||
step "Build minified" \
|
||||
npm run gulp -- "vscode-linux-$ARCH-min"
|
||||
|
||||
function configureEnvironment {
|
||||
id -u testuser &>/dev/null || (useradd -m testuser; chpasswd <<< testuser:testpassword)
|
||||
sudo -i -u testuser git config --global user.name "VS Code Agent"
|
||||
sudo -i -u testuser git config --global user.email "monacotools@microsoft.com"
|
||||
chown -R testuser $AGENT_BUILDDIRECTORY
|
||||
}
|
||||
|
||||
step "Configure environment" \
|
||||
configureEnvironment
|
||||
|
||||
function runSmokeTest {
|
||||
cd test/smoke && sudo -u testuser ../../node_modules/.bin/mocha --build "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders"
|
||||
}
|
||||
|
||||
step "Run smoke test" \
|
||||
runSmokeTest
|
||||
|
||||
@@ -36,8 +36,11 @@ ADD xvfb.init /etc/init.d/xvfb
|
||||
RUN chmod +x /etc/init.d/xvfb
|
||||
RUN update-rc.d xvfb defaults
|
||||
|
||||
# dbus
|
||||
RUN ln -sf /bin/dbus-daemon /usr/bin/dbus-daemon
|
||||
|
||||
# nvm
|
||||
ENV NVM_DIR /usr/local/nvm
|
||||
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
|
||||
|
||||
CMD (service xvfb start; export DISPLAY=:10; ./start.sh)
|
||||
CMD (service xvfb start; service dbus start; export DISPLAY=:10; ./start.sh)
|
||||
@@ -52,4 +52,11 @@ step "Run unit tests" {
|
||||
# exec { & .\scripts\test-integration.bat }
|
||||
# }
|
||||
|
||||
# step "Run smoke test" {
|
||||
# $Artifacts = "$env:AGENT_BUILDDIRECTORY\smoketest-artifacts"
|
||||
# Remove-Item -Recurse -Force -ErrorAction Ignore $Artifacts
|
||||
|
||||
# exec { & npm run smoketest -- --build "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch" --log "$Artifacts" }
|
||||
# }
|
||||
|
||||
done
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
Param(
|
||||
[string]$arch,
|
||||
[string]$mixinPassword,
|
||||
[string]$vsoPAT,
|
||||
[string]$storageKey,
|
||||
[string]$mooncakeStorageKey,
|
||||
[string]$documentDbKey
|
||||
)
|
||||
|
||||
. .\build\tfs\win32\node.ps1
|
||||
. .\scripts\env.ps1
|
||||
. .\build\tfs\win32\lib.ps1
|
||||
|
||||
# Create a _netrc file to download distro dependencies
|
||||
# In order to get _netrc to work, we need a HOME variable setup
|
||||
"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:HOME\_netrc" -Encoding ASCII
|
||||
|
||||
# Set the right architecture
|
||||
$env:npm_config_arch="$arch"
|
||||
|
||||
step "Install dependencies" {
|
||||
exec { & npm install }
|
||||
}
|
||||
|
||||
step "Hygiene" {
|
||||
exec { & npm run gulp -- hygiene }
|
||||
}
|
||||
|
||||
$env:VSCODE_MIXIN_PASSWORD = $mixinPassword
|
||||
step "Mix in repository from vscode-distro" {
|
||||
exec { & npm run gulp -- mixin }
|
||||
}
|
||||
|
||||
step "Get Electron" {
|
||||
exec { & npm run gulp -- "electron-$global:arch" }
|
||||
}
|
||||
|
||||
step "Install distro dependencies" {
|
||||
exec { & node build\tfs\common\installDistro.js }
|
||||
}
|
||||
|
||||
step "Build minified" {
|
||||
exec { & npm run gulp -- "vscode-win32-$global:arch-min" }
|
||||
}
|
||||
|
||||
step "Run unit tests" {
|
||||
exec { & .\scripts\test.bat --build --reporter dot }
|
||||
}
|
||||
|
||||
step "Run smoke test" {
|
||||
$Artifacts = "$env:AGENT_BUILDDIRECTORY\smoketest-artifacts"
|
||||
Remove-Item -Recurse -Force -ErrorAction Ignore $Artifacts
|
||||
|
||||
exec { & npm run smoketest -- --build "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch" --log "$Artifacts" }
|
||||
}
|
||||
|
||||
step "Create archive and setup package" {
|
||||
exec { & npm run gulp -- "vscode-win32-$global:arch-archive" "vscode-win32-$global:arch-setup" }
|
||||
}
|
||||
|
||||
$Repo = "$(pwd)"
|
||||
$Root = "$Repo\.."
|
||||
$Exe = "$Repo\.build\win32-$arch\setup\VSCodeSetup.exe"
|
||||
$Zip = "$Repo\.build\win32-$arch\archive\VSCode-win32-$arch.zip"
|
||||
$Build = "$Root\VSCode-win32-$arch"
|
||||
|
||||
# get version
|
||||
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
||||
$Version = $PackageJson.version
|
||||
$Quality = "$env:VSCODE_QUALITY"
|
||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey
|
||||
$env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey
|
||||
$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey
|
||||
|
||||
$assetPlatform = if ($arch -eq "ia32") { "win32" } else { "win32-x64" }
|
||||
|
||||
step "Publish UNSIGNED archive" {
|
||||
exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive-unsigned "VSCode-win32-$global:arch-$Version-unsigned.zip" $Version false $Zip }
|
||||
}
|
||||
|
||||
step "Publish UNSIGNED setup package" {
|
||||
exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup-unsigned "VSCodeSetup-$global:arch-$Version-unsigned.exe" $Version false $Exe }
|
||||
}
|
||||
|
||||
done
|
||||
@@ -1,47 +0,0 @@
|
||||
Param(
|
||||
[string]$arch,
|
||||
[string]$mixinPassword,
|
||||
[string]$vsoPAT
|
||||
)
|
||||
|
||||
. .\build\tfs\win32\node.ps1
|
||||
. .\scripts\env.ps1
|
||||
. .\build\tfs\win32\lib.ps1
|
||||
|
||||
# Create a _netrc file to download distro dependencies
|
||||
# In order to get _netrc to work, we need a HOME variable setup
|
||||
$env:HOME = $env:USERPROFILE
|
||||
"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
||||
|
||||
# Set the right architecture
|
||||
$env:npm_config_arch = "$arch"
|
||||
|
||||
step "Install dependencies" {
|
||||
exec { & npm install }
|
||||
}
|
||||
|
||||
$env:VSCODE_MIXIN_PASSWORD = $mixinPassword
|
||||
step "Mix in repository from vscode-distro" {
|
||||
exec { & npm run gulp -- mixin }
|
||||
}
|
||||
|
||||
step "Get Electron" {
|
||||
exec { & npm run gulp -- "electron-$global:arch" }
|
||||
}
|
||||
|
||||
step "Install distro dependencies" {
|
||||
exec { & node build\tfs\common\installDistro.js }
|
||||
}
|
||||
|
||||
step "Build minified" {
|
||||
exec { & npm run gulp -- "vscode-win32-$global:arch-min" }
|
||||
}
|
||||
|
||||
step "Run smoke test" {
|
||||
exec { & Push-Location test\smoke }
|
||||
exec { & npm install }
|
||||
exec { & npm run smoketest -- --build "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch\Code - Insiders.exe" }
|
||||
exec { & Pop-Location }
|
||||
}
|
||||
|
||||
done
|
||||
@@ -19,6 +19,7 @@ OutputBaseFilename=VSCodeSetup
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
AppMutex={#AppMutex}
|
||||
SetupMutex={#AppMutex}setup
|
||||
WizardImageFile={#RepoDir}\resources\win32\inno-big.bmp
|
||||
WizardSmallImageFile={#RepoDir}\resources\win32\inno-small.bmp
|
||||
SetupIconFile={#RepoDir}\resources\win32\code.ico
|
||||
@@ -122,6 +123,12 @@ Root: HKCR; Subkey: "{#RegValueName}.bashrc"; ValueType: string; ValueName: "";
|
||||
Root: HKCR; Subkey: "{#RegValueName}.bashrc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico"; Tasks: associatewithfiles
|
||||
Root: HKCR; Subkey: "{#RegValueName}.bashrc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: associatewithfiles
|
||||
|
||||
Root: HKCR; Subkey: ".bib\OpenWithProgids"; ValueType: none; ValueName: "{#RegValueName}"; Flags: deletevalue uninsdeletevalue; Tasks: associatewithfiles
|
||||
Root: HKCR; Subkey: ".bib\OpenWithProgids"; ValueType: string; ValueName: "{#RegValueName}.bib"; ValueData: ""; Flags: uninsdeletevalue; Tasks: associatewithfiles
|
||||
Root: HKCR; Subkey: "{#RegValueName}.bib"; ValueType: string; ValueName: ""; ValueData: "{cm:SourceFile,BibTeX}"; Flags: uninsdeletekey; Tasks: associatewithfiles
|
||||
Root: HKCR; Subkey: "{#RegValueName}.bib\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico"; Tasks: associatewithfiles
|
||||
Root: HKCR; Subkey: "{#RegValueName}.bib\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: associatewithfiles
|
||||
|
||||
Root: HKCR; Subkey: ".bowerrc\OpenWithProgids"; ValueType: none; ValueName: "{#RegValueName}"; Flags: deletevalue uninsdeletevalue; Tasks: associatewithfiles
|
||||
Root: HKCR; Subkey: ".bowerrc\OpenWithProgids"; ValueType: string; ValueName: "{#RegValueName}.bowerrc"; ValueData: ""; Flags: uninsdeletevalue; Tasks: associatewithfiles
|
||||
Root: HKCR; Subkey: "{#RegValueName}.bowerrc"; ValueType: string; ValueName: ""; ValueData: "{cm:SourceFile,Bower RC}"; Flags: uninsdeletekey; Tasks: associatewithfiles
|
||||
|
||||
@@ -18,5 +18,11 @@
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""]
|
||||
]
|
||||
}
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*(::\\s*|REM\\s+)#region",
|
||||
"end": "^\\s*(::\\s*|REM\\s+)#endregion"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,5 +18,8 @@
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""]
|
||||
]
|
||||
],
|
||||
"folding": {
|
||||
"offSide": true
|
||||
}
|
||||
}
|
||||
@@ -21,5 +21,8 @@
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
]
|
||||
],
|
||||
"folding": {
|
||||
"offSide": true
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/atom/language-coffee-script/commit/087e41aeef03b52615ef5c9e159a4b98e813f8a6",
|
||||
"version": "https://github.com/atom/language-coffee-script/commit/c0dbeede971ff5391ec1d94d4ea5d94e60d7e3e3",
|
||||
"scopeName": "source.coffee",
|
||||
"name": "CoffeeScript",
|
||||
"fileTypes": [
|
||||
@@ -17,35 +17,22 @@
|
||||
"firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/)\n coffee\n(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n coffee\n (?=[\\s;]|(?<![-*])-\\*-).*?-\\*-\n |\n # Vim\n (?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n coffee\n (?=\\s|:|$)\n)",
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.function.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.type.function.coffee"
|
||||
}
|
||||
},
|
||||
"comment": "match stuff like: a -> … ",
|
||||
"match": "(\\([^()]*?\\))\\s*([=-]>)",
|
||||
"name": "meta.inline.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(new)\\s+(?:(?:(class)\\s+(\\w+(?:\\.\\w*)*)?)|(\\w+(?:\\.\\w*)*))",
|
||||
"name": "meta.class.instance.constructor.coffee",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.new.coffee"
|
||||
},
|
||||
"4": {
|
||||
"2": {
|
||||
"name": "storage.type.class.coffee"
|
||||
},
|
||||
"6": {
|
||||
"3": {
|
||||
"name": "entity.name.type.instance.coffee"
|
||||
},
|
||||
"7": {
|
||||
"4": {
|
||||
"name": "entity.name.type.instance.coffee"
|
||||
}
|
||||
},
|
||||
"match": "(new)\\s+(((class)(\\s+(\\w+(?:\\.\\w*)*))?)|(\\w+(?:\\.\\w*)*))",
|
||||
"name": "meta.class.instance.constructor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "'''",
|
||||
@@ -60,7 +47,7 @@
|
||||
"name": "punctuation.definition.string.end.coffee"
|
||||
}
|
||||
},
|
||||
"name": "string.quoted.heredoc.coffee",
|
||||
"name": "string.quoted.single.heredoc.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
@@ -103,34 +90,38 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "`",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"match": "(`)(.*)(`)",
|
||||
"name": "string.quoted.script.coffee",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.coffee"
|
||||
}
|
||||
},
|
||||
"end": "`",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
},
|
||||
"2": {
|
||||
"name": "source.js.embedded.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.string.end.coffee"
|
||||
}
|
||||
},
|
||||
"name": "string.quoted.script.coffee",
|
||||
"contentName": "source.embedded.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(?<!#)###(?!#)",
|
||||
"captures": {
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.coffee"
|
||||
}
|
||||
},
|
||||
"end": "###",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.coffee"
|
||||
}
|
||||
},
|
||||
"end": "###(?:[ \\t]*\\n)",
|
||||
"name": "comment.block.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -152,7 +143,7 @@
|
||||
{
|
||||
"begin": "///",
|
||||
"end": "(///)[gimuy]*",
|
||||
"name": "string.regexp.coffee",
|
||||
"name": "string.regexp.multiline.coffee",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.coffee"
|
||||
@@ -170,49 +161,121 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(?<![\\w$])(/)(?![/*+?])(.+?)(/)[gimuy]*(?!\\s*[\\w$/(])",
|
||||
"captures": {
|
||||
"begin": "(?<![\\w$])(/)(?=(?![/*+?])(.+)(/)[gimuy]*(?!\\s*[\\w$/(]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.coffee"
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js.regexp"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
}
|
||||
},
|
||||
"end": "(/)[gimuy]*(?!\\s*[\\w$/(])",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.end.coffee"
|
||||
}
|
||||
},
|
||||
"name": "string.regexp.coffee"
|
||||
"name": "string.regexp.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js.regexp"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "\\b(?<![\\.\\$])(break|by|catch|continue|else|finally|for|in|of|if|return|switch|then|throw|try|unless|when|while|until|loop|do|export|import|default|from|as|yield|async|await|(?<=for)\\s+own)(?!\\s*:)\\b",
|
||||
"name": "keyword.control.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(and|or|<<|>>>?|(?<!\\()\\/|[=!<>*%+\\-&^])?=(?!>)|[!%^*\\/~?:]|\\-?\\-(?!>)|\\+\\+?|<>|<|>|&&?|\\.\\.\\.?|\\|\\|?|\\b(?<![\\.\\$])(instanceof|new|delete|typeof|and|or|is|isnt|not|super)(?!\\s*:)\\b",
|
||||
"name": "keyword.operator.coffee"
|
||||
"match": "\\b(?<![\\.\\$])(delete|instanceof|new|typeof)(?!\\s*:)\\b",
|
||||
"name": "keyword.operator.$1.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\b(?<![\\.\\$])(case|function|var|void|with|const|let|enum|native|__hasProp|__extends|__slice|__bind|__indexOf|implements|interface|package|private|protected|public|static)(?!\\s*:)\\b",
|
||||
"name": "keyword.reserved.coffee"
|
||||
},
|
||||
{
|
||||
"match": "([a-zA-Z$_][\\w$]*)\\s*(?!::)(?:(:)|((?:or|and|[-+\\/&%*?])?=)(?![>=]))(?!(\\s*\\(.*\\))?\\s*([=-]>))",
|
||||
"captures": {
|
||||
"begin": "(?x)\n(?<=\\s|^)((@)?[a-zA-Z_$][\\w$]*)\n\\s*([:=])\\s*\n(?=(\\([^\\(\\)]*\\)\\s*)?[=-]>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.assignment.coffee"
|
||||
"name": "entity.name.function.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value"
|
||||
"name": "variable.other.readwrite.instance.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.operator.coffee"
|
||||
"name": "keyword.operator.assignment.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
"end": "[=-]>",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.function.coffee"
|
||||
}
|
||||
},
|
||||
"name": "meta.function.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function_params"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?x)\n(?<=\\s|^)(?:((')([^']*?)('))|((\")([^\"]*?)(\")))\n\\s*([:=])\\s*\n(?=(\\([^\\(\\)]*\\)\\s*)?[=-]>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "string.quoted.single.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.function.coffee"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.string.end.coffee"
|
||||
},
|
||||
"5": {
|
||||
"name": "string.quoted.double.coffee"
|
||||
},
|
||||
"6": {
|
||||
"name": "punctuation.definition.string.begin.coffee"
|
||||
},
|
||||
"7": {
|
||||
"name": "entity.name.function.coffee"
|
||||
},
|
||||
"8": {
|
||||
"name": "punctuation.definition.string.end.coffee"
|
||||
},
|
||||
"9": {
|
||||
"name": "keyword.operator.assignment.coffee"
|
||||
}
|
||||
},
|
||||
"end": "[=-]>",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.function.coffee"
|
||||
}
|
||||
},
|
||||
"name": "meta.function.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function_params"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=(\\([^\\(\\)]*\\)\\s*)?[=-]>)",
|
||||
"end": "[=-]>",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.function.coffee"
|
||||
}
|
||||
},
|
||||
"name": "meta.function.inline.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function_params"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=\\s|^)({)(?=[^'\"#]+?}[\\s\\]}]*=)",
|
||||
@@ -221,9 +284,9 @@
|
||||
"name": "punctuation.definition.destructuring.begin.bracket.curly.coffee"
|
||||
}
|
||||
},
|
||||
"end": "(})",
|
||||
"end": "}",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.destructuring.end.bracket.curly.coffee"
|
||||
}
|
||||
},
|
||||
@@ -233,7 +296,8 @@
|
||||
"include": "$self"
|
||||
},
|
||||
{
|
||||
"include": "#variable_name"
|
||||
"match": "[a-zA-Z$_]\\w*",
|
||||
"name": "variable.assignment.coffee"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -244,9 +308,9 @@
|
||||
"name": "punctuation.definition.destructuring.begin.bracket.square.coffee"
|
||||
}
|
||||
},
|
||||
"end": "(\\])",
|
||||
"end": "\\]",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.destructuring.end.bracket.square.coffee"
|
||||
}
|
||||
},
|
||||
@@ -256,25 +320,11 @@
|
||||
"include": "$self"
|
||||
},
|
||||
{
|
||||
"include": "#variable_name"
|
||||
"match": "[a-zA-Z$_]\\w*",
|
||||
"name": "variable.assignment.coffee"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(?x)\n(?<=^|\\s)\n(?=@?[a-zA-Z\\$_])\n@?([a-zA-Z\\$_]\\w*)(\\$|:|\\.)?\\s*\n(?=[:=](\\s*\\(.*\\))?\\s*([=-]>))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.function.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.function.coffee"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.type.function.coffee"
|
||||
}
|
||||
},
|
||||
"name": "meta.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\b(?<!\\.|::)(true|on|yes)(?!\\s*[:=][^=])\\b",
|
||||
"name": "constant.language.boolean.true.coffee"
|
||||
@@ -283,18 +333,6 @@
|
||||
"match": "\\b(?<!\\.|::)(false|off|no)(?!\\s*[:=][^=])\\b",
|
||||
"name": "constant.language.boolean.false.coffee"
|
||||
},
|
||||
{
|
||||
"match": "@?\\b(?!class|subclass|extends|decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require)(\\w+)(?=\\s+(?!(of|in|then|is|isnt|and|or|for|else|when|not|if|unless)\\b)(?=(@?\\w+|\\->|\\-\\d|\\[|\\{|\"|'))|(?=\\())",
|
||||
"captures": {
|
||||
"4": {
|
||||
"name": "entity.name.function.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "[=-]>",
|
||||
"name": "storage.type.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\b(?<!\\.|::)null(?!\\s*[:=][^=])\\b",
|
||||
"name": "constant.language.null.coffee"
|
||||
@@ -304,8 +342,8 @@
|
||||
"name": "variable.language.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\b(?<!\\.)this(?!\\s*[:=][^=])\\b",
|
||||
"name": "variable.language.this.coffee"
|
||||
"match": "(?<!\\.)\\b(?<!\\$)(super|this|arguments)(?!\\s*[:=][^=]|\\$)\\b",
|
||||
"name": "variable.language.$1.coffee"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
@@ -356,10 +394,6 @@
|
||||
"match": "((?<=console\\.)(debug|warn|info|log|error|time|timeEnd|assert))\\b",
|
||||
"name": "support.function.console.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\b(decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require)\\b",
|
||||
"name": "support.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "((?<=\\.)(apply|call|concat|every|filter|forEach|from|hasOwnProperty|indexOf|isPrototypeOf|join|lastIndexOf|map|of|pop|propertyIsEnumerable|push|reduce(Right)?|reverse|shift|slice|some|sort|splice|to(Locale)?String|unshift|valueOf))\\b",
|
||||
"name": "support.function.method.array.coffee"
|
||||
@@ -389,28 +423,103 @@
|
||||
"name": "constant.language.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\;",
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#method_calls"
|
||||
},
|
||||
{
|
||||
"include": "#function_calls"
|
||||
},
|
||||
{
|
||||
"include": "#numbers"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
{
|
||||
"include": "#properties"
|
||||
},
|
||||
{
|
||||
"match": "::",
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\$)\\b[0-9]+[\\w$]*",
|
||||
"name": "invalid.illegal.identifier.coffee"
|
||||
},
|
||||
{
|
||||
"match": ";",
|
||||
"name": "punctuation.terminator.statement.coffee"
|
||||
},
|
||||
{
|
||||
"match": ",",
|
||||
"name": "meta.delimiter.object.comma.coffee"
|
||||
"name": "punctuation.separator.delimiter.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\.",
|
||||
"name": "meta.delimiter.method.period.coffee"
|
||||
"begin": "{",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "meta.brace.curly.coffee"
|
||||
}
|
||||
},
|
||||
"end": "}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "meta.brace.curly.coffee"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "\\{|\\}",
|
||||
"name": "meta.brace.curly.coffee"
|
||||
"begin": "\\[",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.array.begin.bracket.square.coffee"
|
||||
}
|
||||
},
|
||||
"end": "\\]",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.array.end.bracket.square.coffee"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?<!\\.)\\.{3}",
|
||||
"name": "keyword.operator.slice.exclusive.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\.)\\.{2}",
|
||||
"name": "keyword.operator.slice.inclusive.coffee"
|
||||
},
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "\\(|\\)",
|
||||
"name": "meta.brace.round.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\[|\\]\\s*",
|
||||
"name": "meta.brace.square.coffee"
|
||||
"begin": "\\(",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "meta.brace.round.coffee"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "meta.brace.round.coffee"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#instance_variable"
|
||||
@@ -420,12 +529,43 @@
|
||||
},
|
||||
{
|
||||
"include": "#double_quoted_string"
|
||||
},
|
||||
{
|
||||
"include": "#numeric"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"arguments": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\(",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.arguments.begin.bracket.round.coffee"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.arguments.end.bracket.round.coffee"
|
||||
}
|
||||
},
|
||||
"name": "meta.arguments.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=(@|@?[\\w$]+|[=-]>|\\-\\d|\\[|{|\"|'))",
|
||||
"end": "(?=\\s*(?<![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))|(?=\\s*(}|\\)|#|$))",
|
||||
"name": "meta.arguments.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"double_quoted_string": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -459,6 +599,116 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"function_calls": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(@)?([\\w$]+)(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.other.readwrite.instance.coffee"
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function_names"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))",
|
||||
"name": "meta.function-call.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#arguments"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?x)\n(@)?([\\w$]+)\n\\s*\n(?=\\s+(?!(?<![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))(?=(@?[\\w$]+|[=-]>|\\-\\d|\\[|{|\"|')))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.other.readwrite.instance.coffee"
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function_names"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?=\\s*(?<![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))|(?=\\s*(}|\\)|#|$))",
|
||||
"name": "meta.function-call.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#arguments"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"function_names": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x)\n\\b(isNaN|isFinite|eval|uneval|parseInt|parseFloat|decodeURI|\ndecodeURIComponent|encodeURI|encodeURIComponent|escape|unescape|\nrequire|set(Interval|Timeout)|clear(Interval|Timeout))\\b",
|
||||
"name": "support.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "[a-zA-Z_$][\\w$]*",
|
||||
"name": "entity.name.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\d[\\w$]*",
|
||||
"name": "invalid.illegal.identifier.coffee"
|
||||
}
|
||||
]
|
||||
},
|
||||
"function_params": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\(",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.parameters.begin.bracket.round.coffee"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.parameters.end.bracket.round.coffee"
|
||||
}
|
||||
},
|
||||
"name": "meta.parameters.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "([a-zA-Z_$][\\w$]*)(\\.\\.\\.)?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.function.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.splat.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(@(?:[a-zA-Z_$][\\w$]*)?)(\\.\\.\\.)?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.function.readwrite.instance.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.splat.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "$self"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"embedded_comment": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -499,11 +749,304 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"numeric": {
|
||||
"method_calls": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?<!\\$)\\b((0([box])[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?(e[+\\-]?[0-9]+)?))\\b",
|
||||
"name": "constant.numeric.coffee"
|
||||
"begin": "(?:(\\.)|(::))\\s*([\\w$]+)\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.method.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
"3": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#method_names"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))",
|
||||
"name": "meta.method-call.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#arguments"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?:(\\.)|(::))\\s*([\\w$]+)\\s*(?=\\s+(?!(?<![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))(?=(@|@?[\\w$]+|[=-]>|\\-\\d|\\[|{|\"|')))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.method.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
"3": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#method_names"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?=\\s*(?<![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))|(?=\\s*(}|\\)|#|$))",
|
||||
"name": "meta.method-call.coffee",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#arguments"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"method_names": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x)\n\\bon(Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\nReadystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\nBefore(cut|deactivate|unload|update|paste|print|editfocus|activate)|\nBlur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\nChange|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\nDatasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\nDragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\nErrorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\\b",
|
||||
"name": "support.function.event-handler.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(?x)\n\\b(shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\nscrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\nsup|sub|substr|substring|splice|split|send|set(Milliseconds|Seconds|Minutes|Hours|\nMonth|Year|FullYear|Date|UTC(Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\nTime|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\nsavePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\ncontextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\ncreateEventObject|to(GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\ntest|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\nuntaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\nprint|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\nfileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\nforward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\nabort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\nreleaseCapture|releaseEvents|go|get(Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\nTime|Date|TimezoneOffset|UTC(Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\nAttention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\nmoveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back)\\b",
|
||||
"name": "support.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(?x)\n\\b(acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\nappendChild|appendData|before|blur|canPlayType|captureStream|\ncaretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\ncloneContents|cloneNode|cloneRange|close|closest|collapse|\ncompareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\nconvertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\ncreateAttributeNS|createCaption|createCDATASection|createComment|\ncreateContextualFragment|createDocument|createDocumentFragment|\ncreateDocumentType|createElement|createElementNS|createEntityReference|\ncreateEvent|createExpression|createHTMLDocument|createNodeIterator|\ncreateNSResolver|createProcessingInstruction|createRange|createShadowRoot|\ncreateTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\ndeleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\ndeleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\nenableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\nexitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\ngetAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\ngetAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\ngetClientRects|getContext|getDestinationInsertionPoints|getElementById|\ngetElementsByClassName|getElementsByName|getElementsByTagName|\ngetElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\ngetVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\nhasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\ninsertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\ninsertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\nisPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\nlookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\nmoveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\nparentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\npreviousSibling|probablySupportsContext|queryCommandEnabled|\nqueryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\nquerySelector|querySelectorAll|registerContentHandler|registerElement|\nregisterProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\nremoveAttributeNode|removeAttributeNS|removeChild|removeEventListener|\nremoveItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\nrequestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\nscrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\nsetAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\nsetCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\nsetRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\nslice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\nsubmit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\ntoDataURL|toggle|toString|values|write|writeln)\\b",
|
||||
"name": "support.function.dom.coffee"
|
||||
},
|
||||
{
|
||||
"match": "[a-zA-Z_$][\\w$]*",
|
||||
"name": "entity.name.function.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\d[\\w$]*",
|
||||
"name": "invalid.illegal.identifier.coffee"
|
||||
}
|
||||
]
|
||||
},
|
||||
"numbers": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)",
|
||||
"name": "constant.numeric.hex.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)",
|
||||
"name": "constant.numeric.binary.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)",
|
||||
"name": "constant.numeric.octal.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(?=\\.{2,3}))| # 1 followed by a slice\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "constant.numeric.decimal.coffee"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.separator.decimal.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.decimal.period.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.separator.decimal.period.coffee"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.separator.decimal.period.coffee"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.separator.decimal.period.coffee"
|
||||
},
|
||||
"6": {
|
||||
"name": "punctuation.separator.decimal.period.coffee"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"objects": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "[A-Z][A-Z0-9_$]*(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))",
|
||||
"name": "constant.other.object.coffee"
|
||||
},
|
||||
{
|
||||
"match": "[a-zA-Z_$][\\w$]*(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))",
|
||||
"name": "variable.other.object.coffee"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operators": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?:([a-zA-Z$_][\\w$]*)?\\s+|(?<![\\w$]))(and=|or=)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.assignment.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.compound.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "([a-zA-Z$_][\\w$]*)?\\s*(%=|\\+=|-=|\\*=|&&=|\\|\\|=|\\?=|(?<!\\()/=)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.assignment.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.compound.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "([a-zA-Z$_][\\w$]*)?\\s*(&=|\\^=|<<=|>>=|>>>=|\\|=)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.assignment.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.compound.bitwise.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "<<|>>>|>>",
|
||||
"name": "keyword.operator.bitwise.shift.coffee"
|
||||
},
|
||||
{
|
||||
"match": "!=|<=|>=|==|<|>",
|
||||
"name": "keyword.operator.comparison.coffee"
|
||||
},
|
||||
{
|
||||
"match": "&&|!|\\|\\|",
|
||||
"name": "keyword.operator.logical.coffee"
|
||||
},
|
||||
{
|
||||
"match": "&|\\||\\^|~",
|
||||
"name": "keyword.operator.bitwise.coffee"
|
||||
},
|
||||
{
|
||||
"match": "([a-zA-Z$_][\\w$]*)?\\s*(=|:(?!:))(?![>=])",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.assignment.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "--",
|
||||
"name": "keyword.operator.decrement.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\+\\+",
|
||||
"name": "keyword.operator.increment.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\.\\.\\.",
|
||||
"name": "keyword.operator.splat.coffee"
|
||||
},
|
||||
{
|
||||
"match": "\\?",
|
||||
"name": "keyword.operator.existential.coffee"
|
||||
},
|
||||
{
|
||||
"match": "%|\\*|/|-|\\+",
|
||||
"name": "keyword.operator.coffee"
|
||||
},
|
||||
{
|
||||
"match": "(?x)\n\\b(?<![\\.\\$])\n(?:\n (and|or|not) # logical\n |\n (is|isnt) # comparison\n)\n(?!\\s*:)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.logical.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.comparison.coffee"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.property.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "constant.other.object.property.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.property.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.object.property.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.property.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "constant.other.property.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.property.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.property.coffee"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?:(\\.)|(::))\\s*([0-9][\\w$]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.property.period.coffee"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.prototype.coffee"
|
||||
},
|
||||
"3": {
|
||||
"name": "invalid.illegal.identifier.coffee"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -537,19 +1080,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"variable_name": {
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.assignment.coffee"
|
||||
}
|
||||
},
|
||||
"match": "([a-zA-Z\\$_]\\w*(\\.\\w+)*)",
|
||||
"name": "variable.assignment.coffee"
|
||||
}
|
||||
]
|
||||
},
|
||||
"regex-character-class": {
|
||||
"patterns": [
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -55,7 +55,62 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Hello (\\d+) #{user}",
|
||||
"c": "Hello ",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.group.regexp: #CE9178",
|
||||
"light_plus": "punctuation.definition.group.regexp: #D16969",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "\\d",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp constant.character.character-class.regexp",
|
||||
"r": {
|
||||
"dark_plus": "constant.character.character-class.regexp: #D16969",
|
||||
"light_plus": "constant.character.character-class.regexp: #811F3F",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "constant.character: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "+",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp keyword.operator.quantifier.regexp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator.quantifier.regexp: #D7BA7D",
|
||||
"light_plus": "keyword.operator.quantifier.regexp: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.group.regexp: #CE9178",
|
||||
"light_plus": "punctuation.definition.group.regexp: #D16969",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " #{user}",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
@@ -89,7 +144,7 @@
|
||||
},
|
||||
{
|
||||
"c": "2",
|
||||
"t": "source.coffee constant.numeric.coffee",
|
||||
"t": "source.coffee constant.numeric.decimal.coffee",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
@@ -133,7 +188,7 @@
|
||||
},
|
||||
{
|
||||
"c": "3",
|
||||
"t": "source.coffee constant.numeric.coffee",
|
||||
"t": "source.coffee constant.numeric.decimal.coffee",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
@@ -144,7 +199,7 @@
|
||||
},
|
||||
{
|
||||
"c": "2",
|
||||
"t": "source.coffee constant.numeric.coffee",
|
||||
"t": "source.coffee constant.numeric.decimal.coffee",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
@@ -166,7 +221,7 @@
|
||||
},
|
||||
{
|
||||
"c": "3",
|
||||
"t": "source.coffee constant.numeric.coffee",
|
||||
"t": "source.coffee constant.numeric.decimal.coffee",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
@@ -199,7 +254,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -309,7 +364,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -364,7 +419,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -375,7 +430,7 @@
|
||||
},
|
||||
{
|
||||
"c": "///",
|
||||
"t": "source.coffee string.regexp.coffee punctuation.definition.string.begin.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee punctuation.definition.string.begin.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -386,7 +441,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -397,18 +452,18 @@
|
||||
},
|
||||
{
|
||||
"c": "#{",
|
||||
"t": "source.coffee string.regexp.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded.coffee: #569CD6"
|
||||
"dark_plus": "punctuation.section.embedded: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "name",
|
||||
"t": "source.coffee string.regexp.coffee source.coffee.embedded.source",
|
||||
"t": "source.coffee string.regexp.multiline.coffee source.coffee.embedded.source",
|
||||
"r": {
|
||||
"dark_plus": "source.coffee.embedded: #9CDCFE",
|
||||
"light_plus": "source.coffee.embedded: #FF0000",
|
||||
@@ -419,18 +474,18 @@
|
||||
},
|
||||
{
|
||||
"c": "}",
|
||||
"t": "source.coffee string.regexp.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded.coffee: #569CD6"
|
||||
"dark_plus": "punctuation.section.embedded: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "fancyRegExp = ",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -441,7 +496,7 @@
|
||||
},
|
||||
{
|
||||
"c": "///",
|
||||
"t": "source.coffee string.regexp.coffee punctuation.definition.string.end.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee punctuation.definition.string.end.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -661,7 +716,7 @@
|
||||
},
|
||||
{
|
||||
"c": "///",
|
||||
"t": "source.coffee string.regexp.coffee punctuation.definition.string.begin.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee punctuation.definition.string.begin.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
},
|
||||
{
|
||||
"c": ":",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee meta.function.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -100,7 +100,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -110,8 +110,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(@name)",
|
||||
"t": "source.coffee meta.inline.function.coffee variable.parameter.function.coffee",
|
||||
"c": "(",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.begin.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "@name",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee variable.parameter.function.readwrite.instance.coffee",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
@@ -120,9 +131,20 @@
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.end.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee meta.inline.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -133,7 +155,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=>",
|
||||
"t": "source.coffee meta.inline.function.coffee storage.type.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee storage.type.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
@@ -166,7 +188,7 @@
|
||||
},
|
||||
{
|
||||
"c": ":",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee meta.function.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -177,7 +199,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -187,19 +209,30 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "()",
|
||||
"t": "source.coffee meta.inline.function.coffee variable.parameter.function.coffee",
|
||||
"c": "(",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.begin.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.end.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee meta.inline.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -210,7 +243,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=>",
|
||||
"t": "source.coffee meta.inline.function.coffee storage.type.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee storage.type.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
@@ -232,7 +265,7 @@
|
||||
},
|
||||
{
|
||||
"c": "alert",
|
||||
"t": "source.coffee entity.name.function.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee entity.name.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
@@ -243,7 +276,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -254,7 +287,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\"",
|
||||
"t": "source.coffee string.quoted.double.coffee punctuation.definition.string.begin.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee punctuation.definition.string.begin.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string: #CE9178",
|
||||
"light_plus": "string: #A31515",
|
||||
@@ -265,7 +298,7 @@
|
||||
},
|
||||
{
|
||||
"c": "Drive ",
|
||||
"t": "source.coffee string.quoted.double.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string: #CE9178",
|
||||
"light_plus": "string: #A31515",
|
||||
@@ -276,18 +309,18 @@
|
||||
},
|
||||
{
|
||||
"c": "#{",
|
||||
"t": "source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded.coffee: #569CD6"
|
||||
"dark_plus": "punctuation.section.embedded: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "@name",
|
||||
"t": "source.coffee string.quoted.double.coffee source.coffee.embedded.source variable.other.readwrite.instance.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee source.coffee.embedded.source variable.other.readwrite.instance.coffee",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
@@ -298,18 +331,18 @@
|
||||
},
|
||||
{
|
||||
"c": "}",
|
||||
"t": "source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded.coffee: #569CD6"
|
||||
"dark_plus": "punctuation.section.embedded: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "\"",
|
||||
"t": "source.coffee string.quoted.double.coffee punctuation.definition.string.end.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee punctuation.definition.string.end.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string: #CE9178",
|
||||
"light_plus": "string: #A31515",
|
||||
@@ -419,7 +452,7 @@
|
||||
},
|
||||
{
|
||||
"c": ":",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee meta.function.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -430,7 +463,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -440,19 +473,30 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "()",
|
||||
"t": "source.coffee meta.inline.function.coffee variable.parameter.function.coffee",
|
||||
"c": "(",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.begin.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.end.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee meta.inline.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -463,7 +507,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=>",
|
||||
"t": "source.coffee meta.inline.function.coffee storage.type.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee storage.type.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
@@ -485,7 +529,7 @@
|
||||
},
|
||||
{
|
||||
"c": "alert",
|
||||
"t": "source.coffee entity.name.function.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee entity.name.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
@@ -496,7 +540,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -507,7 +551,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\"",
|
||||
"t": "source.coffee string.quoted.double.coffee punctuation.definition.string.begin.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee punctuation.definition.string.begin.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string: #CE9178",
|
||||
"light_plus": "string: #A31515",
|
||||
@@ -518,7 +562,7 @@
|
||||
},
|
||||
{
|
||||
"c": "Driving ",
|
||||
"t": "source.coffee string.quoted.double.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string: #CE9178",
|
||||
"light_plus": "string: #A31515",
|
||||
@@ -529,18 +573,18 @@
|
||||
},
|
||||
{
|
||||
"c": "#{",
|
||||
"t": "source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded.coffee: #569CD6"
|
||||
"dark_plus": "punctuation.section.embedded: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "@name",
|
||||
"t": "source.coffee string.quoted.double.coffee source.coffee.embedded.source variable.other.readwrite.instance.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee source.coffee.embedded.source variable.other.readwrite.instance.coffee",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
@@ -551,18 +595,18 @@
|
||||
},
|
||||
{
|
||||
"c": "}",
|
||||
"t": "source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded.coffee: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded.coffee: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded.coffee: #569CD6"
|
||||
"dark_plus": "punctuation.section.embedded: #569CD6",
|
||||
"light_plus": "punctuation.section.embedded: #0000FF",
|
||||
"dark_vs": "punctuation.section.embedded: #569CD6",
|
||||
"light_vs": "punctuation.section.embedded: #0000FF",
|
||||
"hc_black": "punctuation.section.embedded: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "\"",
|
||||
"t": "source.coffee string.quoted.double.coffee punctuation.definition.string.end.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee string.quoted.double.coffee punctuation.definition.string.end.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string: #CE9178",
|
||||
"light_plus": "string: #A31515",
|
||||
@@ -595,7 +639,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -617,7 +661,7 @@
|
||||
},
|
||||
{
|
||||
"c": "new",
|
||||
"t": "source.coffee meta.class.instance.constructor keyword.operator.new.coffee",
|
||||
"t": "source.coffee meta.class.instance.constructor.coffee keyword.operator.new.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator.new: #569CD6",
|
||||
"light_plus": "keyword.operator.new: #0000FF",
|
||||
@@ -628,7 +672,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee meta.class.instance.constructor",
|
||||
"t": "source.coffee meta.class.instance.constructor.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -639,7 +683,7 @@
|
||||
},
|
||||
{
|
||||
"c": "Car",
|
||||
"t": "source.coffee meta.class.instance.constructor entity.name.type.instance.coffee",
|
||||
"t": "source.coffee meta.class.instance.constructor.coffee entity.name.type.instance.coffee",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
"light_plus": "entity.name.type: #267F99",
|
||||
@@ -716,7 +760,7 @@
|
||||
},
|
||||
{
|
||||
"c": "onTheRoad",
|
||||
"t": "source.coffee entity.name.function.coffee",
|
||||
"t": "source.coffee meta.function-call.coffee entity.name.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
@@ -726,8 +770,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "()",
|
||||
"t": "source.coffee meta.brace.round.coffee",
|
||||
"c": "(",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee punctuation.definition.arguments.begin.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -737,7 +781,18 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " c",
|
||||
"c": ")",
|
||||
"t": "source.coffee meta.function-call.coffee meta.arguments.coffee punctuation.definition.arguments.end.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
@@ -747,9 +802,20 @@
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "c",
|
||||
"t": "source.coffee variable.other.object.coffee",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ".",
|
||||
"t": "source.coffee meta.delimiter.method.period.coffee",
|
||||
"t": "source.coffee meta.method-call.coffee punctuation.separator.method.period.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -760,7 +826,7 @@
|
||||
},
|
||||
{
|
||||
"c": "drive",
|
||||
"t": "source.coffee entity.name.function.coffee",
|
||||
"t": "source.coffee meta.method-call.coffee entity.name.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
@@ -770,8 +836,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "()",
|
||||
"t": "source.coffee meta.brace.round.coffee",
|
||||
"c": "(",
|
||||
"t": "source.coffee meta.method-call.coffee meta.arguments.coffee punctuation.definition.arguments.begin.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee meta.method-call.coffee meta.arguments.coffee punctuation.definition.arguments.end.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -804,7 +881,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -837,7 +914,7 @@
|
||||
},
|
||||
{
|
||||
"c": "new",
|
||||
"t": "source.coffee meta.class.instance.constructor keyword.operator.new.coffee",
|
||||
"t": "source.coffee meta.class.instance.constructor.coffee keyword.operator.new.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator.new: #569CD6",
|
||||
"light_plus": "keyword.operator.new: #0000FF",
|
||||
@@ -848,7 +925,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee meta.class.instance.constructor",
|
||||
"t": "source.coffee meta.class.instance.constructor.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -859,7 +936,7 @@
|
||||
},
|
||||
{
|
||||
"c": "Car",
|
||||
"t": "source.coffee meta.class.instance.constructor entity.name.type.instance.coffee",
|
||||
"t": "source.coffee meta.class.instance.constructor.coffee entity.name.type.instance.coffee",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
"light_plus": "entity.name.type: #267F99",
|
||||
@@ -925,7 +1002,7 @@
|
||||
},
|
||||
{
|
||||
"c": "[",
|
||||
"t": "source.coffee meta.brace.square.coffee",
|
||||
"t": "source.coffee punctuation.definition.array.begin.bracket.square.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -936,7 +1013,7 @@
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.coffee constant.numeric.coffee",
|
||||
"t": "source.coffee constant.numeric.decimal.coffee",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
@@ -947,7 +1024,7 @@
|
||||
},
|
||||
{
|
||||
"c": "..",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.slice.inclusive.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -958,7 +1035,7 @@
|
||||
},
|
||||
{
|
||||
"c": "100",
|
||||
"t": "source.coffee constant.numeric.coffee",
|
||||
"t": "source.coffee constant.numeric.decimal.coffee",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
@@ -969,7 +1046,7 @@
|
||||
},
|
||||
{
|
||||
"c": "]",
|
||||
"t": "source.coffee meta.brace.square.coffee",
|
||||
"t": "source.coffee punctuation.definition.array.end.bracket.square.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -1013,7 +1090,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee meta.function.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -1024,7 +1101,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -1034,8 +1111,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(vehicles)",
|
||||
"t": "source.coffee meta.inline.function.coffee variable.parameter.function.coffee",
|
||||
"c": "(",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.begin.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "vehicles",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee variable.parameter.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
@@ -1044,9 +1132,20 @@
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee meta.function.coffee meta.parameters.coffee punctuation.definition.parameters.end.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.coffee meta.inline.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -1057,7 +1156,7 @@
|
||||
},
|
||||
{
|
||||
"c": "->",
|
||||
"t": "source.coffee meta.inline.function.coffee storage.type.function.coffee",
|
||||
"t": "source.coffee meta.function.coffee storage.type.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
@@ -1079,7 +1178,7 @@
|
||||
},
|
||||
{
|
||||
"c": "[",
|
||||
"t": "source.coffee meta.brace.square.coffee",
|
||||
"t": "source.coffee punctuation.definition.array.begin.bracket.square.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -1090,18 +1189,18 @@
|
||||
},
|
||||
{
|
||||
"c": "vehicle",
|
||||
"t": "source.coffee",
|
||||
"t": "source.coffee variable.other.object.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ".",
|
||||
"t": "source.coffee meta.delimiter.method.period.coffee",
|
||||
"t": "source.coffee meta.method-call.coffee punctuation.separator.method.period.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -1112,7 +1211,7 @@
|
||||
},
|
||||
{
|
||||
"c": "drive",
|
||||
"t": "source.coffee entity.name.function.coffee",
|
||||
"t": "source.coffee meta.method-call.coffee entity.name.function.coffee",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
@@ -1122,8 +1221,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "()",
|
||||
"t": "source.coffee meta.brace.round.coffee",
|
||||
"c": "(",
|
||||
"t": "source.coffee meta.method-call.coffee meta.arguments.coffee punctuation.definition.arguments.begin.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee meta.method-call.coffee meta.arguments.coffee punctuation.definition.arguments.end.bracket.round.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -1189,7 +1299,7 @@
|
||||
},
|
||||
{
|
||||
"c": "]",
|
||||
"t": "source.coffee meta.brace.square.coffee",
|
||||
"t": "source.coffee punctuation.definition.array.end.bracket.square.coffee",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -1222,7 +1332,7 @@
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.coffee keyword.operator.coffee",
|
||||
"t": "source.coffee keyword.operator.assignment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
@@ -1244,7 +1354,7 @@
|
||||
},
|
||||
{
|
||||
"c": "///",
|
||||
"t": "source.coffee string.regexp.coffee punctuation.definition.string.begin.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee punctuation.definition.string.begin.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -1255,7 +1365,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\t",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -1266,10 +1376,10 @@
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
"dark_plus": "punctuation.definition.group.regexp: #CE9178",
|
||||
"light_plus": "punctuation.definition.group.regexp: #D16969",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
@@ -1277,21 +1387,21 @@
|
||||
},
|
||||
{
|
||||
"c": "\\d",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp constant.character.character-class.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp constant.character.character-class.regexp",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
"dark_plus": "constant.character.character-class.regexp: #D16969",
|
||||
"light_plus": "constant.character.character-class.regexp: #811F3F",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
"hc_black": "constant.character: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "+",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp keyword.operator.quantifier.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp keyword.operator.quantifier.regexp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
"dark_plus": "keyword.operator.quantifier.regexp: #D7BA7D",
|
||||
"light_plus": "keyword.operator.quantifier.regexp: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
@@ -1299,10 +1409,10 @@
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
"dark_plus": "punctuation.definition.group.regexp: #CE9178",
|
||||
"light_plus": "punctuation.definition.group.regexp: #D16969",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
@@ -1310,7 +1420,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\t",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -1321,7 +1431,7 @@
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.coffee string.regexp.coffee comment.line.number-sign.coffee punctuation.definition.comment.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee comment.line.number-sign.coffee punctuation.definition.comment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "comment: #608B4E",
|
||||
"light_plus": "comment: #008000",
|
||||
@@ -1332,7 +1442,7 @@
|
||||
},
|
||||
{
|
||||
"c": " numbers",
|
||||
"t": "source.coffee string.regexp.coffee comment.line.number-sign.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee comment.line.number-sign.coffee",
|
||||
"r": {
|
||||
"dark_plus": "comment: #608B4E",
|
||||
"light_plus": "comment: #008000",
|
||||
@@ -1343,7 +1453,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\t",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -1354,10 +1464,10 @@
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
"dark_plus": "punctuation.definition.group.regexp: #CE9178",
|
||||
"light_plus": "punctuation.definition.group.regexp: #D16969",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
@@ -1365,21 +1475,21 @@
|
||||
},
|
||||
{
|
||||
"c": "\\w",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp constant.character.character-class.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp constant.character.character-class.regexp",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
"dark_plus": "constant.character.character-class.regexp: #D16969",
|
||||
"light_plus": "constant.character.character-class.regexp: #811F3F",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
"hc_black": "constant.character: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "*",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp keyword.operator.quantifier.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp keyword.operator.quantifier.regexp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
"dark_plus": "keyword.operator.quantifier.regexp: #D7BA7D",
|
||||
"light_plus": "keyword.operator.quantifier.regexp: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
@@ -1387,10 +1497,10 @@
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee meta.group.regexp punctuation.definition.group.regexp",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
"dark_plus": "punctuation.definition.group.regexp: #CE9178",
|
||||
"light_plus": "punctuation.definition.group.regexp: #D16969",
|
||||
"dark_vs": "string.regexp: #D16969",
|
||||
"light_vs": "string.regexp: #811F3F",
|
||||
"hc_black": "string.regexp: #D16969"
|
||||
@@ -1398,7 +1508,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\t",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -1409,7 +1519,7 @@
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.coffee string.regexp.coffee comment.line.number-sign.coffee punctuation.definition.comment.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee comment.line.number-sign.coffee punctuation.definition.comment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "comment: #608B4E",
|
||||
"light_plus": "comment: #008000",
|
||||
@@ -1420,7 +1530,7 @@
|
||||
},
|
||||
{
|
||||
"c": " letters",
|
||||
"t": "source.coffee string.regexp.coffee comment.line.number-sign.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee comment.line.number-sign.coffee",
|
||||
"r": {
|
||||
"dark_plus": "comment: #608B4E",
|
||||
"light_plus": "comment: #008000",
|
||||
@@ -1431,7 +1541,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\t",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -1442,10 +1552,10 @@
|
||||
},
|
||||
{
|
||||
"c": "$",
|
||||
"t": "source.coffee string.regexp.coffee keyword.control.anchor.regexp",
|
||||
"t": "source.coffee string.regexp.multiline.coffee keyword.control.anchor.regexp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "keyword.control.anchor.regexp: #DCDCAA",
|
||||
"light_plus": "keyword.control.anchor.regexp: #FF0000",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
@@ -1453,7 +1563,7 @@
|
||||
},
|
||||
{
|
||||
"c": "\t\t",
|
||||
"t": "source.coffee string.regexp.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
@@ -1464,7 +1574,7 @@
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.coffee string.regexp.coffee comment.line.number-sign.coffee punctuation.definition.comment.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee comment.line.number-sign.coffee punctuation.definition.comment.coffee",
|
||||
"r": {
|
||||
"dark_plus": "comment: #608B4E",
|
||||
"light_plus": "comment: #008000",
|
||||
@@ -1475,7 +1585,7 @@
|
||||
},
|
||||
{
|
||||
"c": " the end",
|
||||
"t": "source.coffee string.regexp.coffee comment.line.number-sign.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee comment.line.number-sign.coffee",
|
||||
"r": {
|
||||
"dark_plus": "comment: #608B4E",
|
||||
"light_plus": "comment: #008000",
|
||||
@@ -1486,7 +1596,7 @@
|
||||
},
|
||||
{
|
||||
"c": "///",
|
||||
"t": "source.coffee string.regexp.coffee punctuation.definition.string.end.coffee",
|
||||
"t": "source.coffee string.regexp.multiline.coffee punctuation.definition.string.end.coffee",
|
||||
"r": {
|
||||
"dark_plus": "string.regexp: #D16969",
|
||||
"light_plus": "string.regexp: #811F3F",
|
||||
|
||||
@@ -33,19 +33,11 @@
|
||||
},
|
||||
{
|
||||
"fileMatch": "vscode://defaultsettings/settings.json",
|
||||
"url": "vscode://schemas/settings"
|
||||
},
|
||||
{
|
||||
"fileMatch": "vscode://defaultsettings/resourceSettings.json",
|
||||
"url": "vscode://schemas/settings/resource"
|
||||
},
|
||||
{
|
||||
"fileMatch": "vscode://settings/workspaceSettings.json",
|
||||
"url": "vscode://schemas/settings"
|
||||
"url": "vscode://schemas/settings/default"
|
||||
},
|
||||
{
|
||||
"fileMatch": "%APP_SETTINGS_HOME%/settings.json",
|
||||
"url": "vscode://schemas/settings"
|
||||
"url": "vscode://schemas/settings/user"
|
||||
},
|
||||
{
|
||||
"fileMatch": "%APP_WORKSPACES_HOME%/*/workspace.json",
|
||||
@@ -61,7 +53,7 @@
|
||||
},
|
||||
{
|
||||
"fileMatch": "/.vscode/settings.json",
|
||||
"url": "vscode://schemas/settings"
|
||||
"url": "vscode://schemas/settings/folder"
|
||||
},
|
||||
{
|
||||
"fileMatch": "/.vscode/launch.json",
|
||||
@@ -82,6 +74,6 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^7.0.4"
|
||||
"@types/node": "7.0.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ const decoration = vscode.window.createTextEditorDecorationType({
|
||||
|
||||
let pendingLaunchJsonDecoration: NodeJS.Timer;
|
||||
|
||||
export function activate(context): void {
|
||||
export function activate(context: vscode.ExtensionContext): void {
|
||||
|
||||
//keybindings.json command-suggestions
|
||||
context.subscriptions.push(registerKeybindingsCompletions());
|
||||
@@ -27,8 +27,8 @@ export function activate(context): void {
|
||||
//settings.json suggestions
|
||||
context.subscriptions.push(registerSettingsCompletions());
|
||||
|
||||
//extensions.json suggestions
|
||||
context.subscriptions.push(registerExtensionsCompletions());
|
||||
//extensions suggestions
|
||||
context.subscriptions.push(...registerExtensionsCompletions());
|
||||
|
||||
// launch.json decorations
|
||||
context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor(editor => updateLaunchJsonDecorations(editor), null, context.subscriptions));
|
||||
@@ -67,43 +67,69 @@ function registerSettingsCompletions(): vscode.Disposable {
|
||||
});
|
||||
}
|
||||
|
||||
function registerExtensionsCompletions(): vscode.Disposable {
|
||||
interface IExtensionsContent {
|
||||
recommendations: string[];
|
||||
}
|
||||
|
||||
function registerExtensionsCompletions(): vscode.Disposable[] {
|
||||
return [registerExtensionsCompletionsInExtensionsDocument(), registerExtensionsCompletionsInWorkspaceConfigurationDocument()];
|
||||
}
|
||||
|
||||
function registerExtensionsCompletionsInExtensionsDocument(): vscode.Disposable {
|
||||
return vscode.languages.registerCompletionItemProvider({ pattern: '**/extensions.json' }, {
|
||||
provideCompletionItems(document, position, token) {
|
||||
const location = getLocation(document.getText(), document.offsetAt(position));
|
||||
const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
|
||||
if (location.path[0] === 'recommendations') {
|
||||
const config = parse(document.getText());
|
||||
const alreadyEnteredExtensions = config && config.recommendations || [];
|
||||
if (Array.isArray(alreadyEnteredExtensions)) {
|
||||
const knownExtensionProposals = vscode.extensions.all.filter(e =>
|
||||
!(e.id.startsWith('vscode.')
|
||||
|| e.id === 'Microsoft.vscode-markdown'
|
||||
|| alreadyEnteredExtensions.indexOf(e.id) > -1));
|
||||
if (knownExtensionProposals.length) {
|
||||
return knownExtensionProposals.map(e => {
|
||||
const item = new vscode.CompletionItem(e.id);
|
||||
const insertText = `"${e.id}"`;
|
||||
item.kind = vscode.CompletionItemKind.Value;
|
||||
item.insertText = insertText;
|
||||
item.range = range;
|
||||
item.filterText = insertText;
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
const example = new vscode.CompletionItem(localize('exampleExtension', "Example"));
|
||||
example.insertText = '"vscode.csharp"';
|
||||
example.kind = vscode.CompletionItemKind.Value;
|
||||
example.range = range;
|
||||
return [example];
|
||||
}
|
||||
}
|
||||
const extensionsContent = <IExtensionsContent>parse(document.getText());
|
||||
return provideInstalledExtensionProposals(extensionsContent, range);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function registerExtensionsCompletionsInWorkspaceConfigurationDocument(): vscode.Disposable {
|
||||
return vscode.languages.registerCompletionItemProvider({ pattern: '**/*.code-workspace' }, {
|
||||
provideCompletionItems(document, position, token) {
|
||||
const location = getLocation(document.getText(), document.offsetAt(position));
|
||||
const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
|
||||
if (location.path[0] === 'extensions' && location.path[1] === 'recommendations') {
|
||||
const extensionsContent = <IExtensionsContent>parse(document.getText())['extensions'];
|
||||
return provideInstalledExtensionProposals(extensionsContent, range);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function provideInstalledExtensionProposals(extensionsContent: IExtensionsContent, range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[] | vscode.CompletionList> {
|
||||
const alreadyEnteredExtensions = extensionsContent && extensionsContent.recommendations || [];
|
||||
if (Array.isArray(alreadyEnteredExtensions)) {
|
||||
const knownExtensionProposals = vscode.extensions.all.filter(e =>
|
||||
!(e.id.startsWith('vscode.')
|
||||
|| e.id === 'Microsoft.vscode-markdown'
|
||||
|| alreadyEnteredExtensions.indexOf(e.id) > -1));
|
||||
if (knownExtensionProposals.length) {
|
||||
return knownExtensionProposals.map(e => {
|
||||
const item = new vscode.CompletionItem(e.id);
|
||||
const insertText = `"${e.id}"`;
|
||||
item.kind = vscode.CompletionItemKind.Value;
|
||||
item.insertText = insertText;
|
||||
item.range = range;
|
||||
item.filterText = insertText;
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
const example = new vscode.CompletionItem(localize('exampleExtension', "Example"));
|
||||
example.insertText = '"vscode.csharp"';
|
||||
example.kind = vscode.CompletionItemKind.Value;
|
||||
example.range = range;
|
||||
return [example];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function newSimpleCompletionItem(label: string, range: vscode.Range, description?: string, insertText?: string): vscode.CompletionItem {
|
||||
const item = new vscode.CompletionItem(label);
|
||||
item.kind = vscode.CompletionItemKind.Value;
|
||||
|
||||
@@ -43,13 +43,13 @@ export class SettingsDocument {
|
||||
private provideWindowTitleCompletionItems(location: Location, range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[]> {
|
||||
const completions: vscode.CompletionItem[] = [];
|
||||
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorShort}', range, localize('activeEditorShort', "e.g. myFile.txt")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorMedium}', range, localize('activeEditorMedium', "e.g. myFolder/myFile.txt")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorLong}', range, localize('activeEditorLong', "e.g. /Users/Development/myProject/myFolder/myFile.txt")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootName}', range, localize('rootName', "e.g. myFolder1, myFolder2, myFolder3")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootPath}', range, localize('rootPath', "e.g. /Users/Development/myProject")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "e.g. myFolder")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderPath}', range, localize('folderPath', "e.g. /Users/Development/myFolder")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorShort}', range, localize('activeEditorShort', "the file name (e.g. myFile.txt)")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorMedium}', range, localize('activeEditorMedium', "the path of the file relative to the workspace folder (e.g. myFolder/myFile.txt)")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorLong}', range, localize('activeEditorLong', "the full path of the file (e.g. /Users/Development/myProject/myFolder/myFile.txt)")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootName}', range, localize('rootName', "name of the workspace (e.g. myFolder or myWorkspace)")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootPath}', range, localize('rootPath', "file path of the workspace (e.g. /Users/Development/myWorkspace)")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "name of the workspace folder the file is contained in (e.g. myFolder)")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderPath}', range, localize('folderPath', "file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)")));
|
||||
completions.push(this.newSimpleCompletionItem('${appName}', range, localize('appName', "e.g. VS Code")));
|
||||
completions.push(this.newSimpleCompletionItem('${dirty}', range, localize('dirty', "a dirty indicator if the active editor is dirty")));
|
||||
completions.push(this.newSimpleCompletionItem('${separator}', range, localize('separator', "a conditional separator (' - ') that only shows when surrounded by variables with values")));
|
||||
@@ -149,7 +149,7 @@ export class SettingsDocument {
|
||||
return Promise.resolve(completions);
|
||||
}
|
||||
|
||||
private provideLanguageCompletionItems(location: Location, range: vscode.Range, formatFunc: (string) => string = (l) => JSON.stringify(l)): vscode.ProviderResult<vscode.CompletionItem[]> {
|
||||
private provideLanguageCompletionItems(location: Location, range: vscode.Range, formatFunc: (string: string) => string = (l) => JSON.stringify(l)): vscode.ProviderResult<vscode.CompletionItem[]> {
|
||||
return vscode.languages.getLanguages().then(languages => {
|
||||
return languages.map(l => {
|
||||
return this.newSimpleCompletionItem(formatFunc(l), range);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"lib": [
|
||||
"es2015"
|
||||
],
|
||||
"strictNullChecks": true
|
||||
"strict": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
|
||||
@@ -25,5 +25,11 @@
|
||||
"indentationRules": {
|
||||
"increaseIndentPattern": "^.*\\{[^}\"\\']*$|^.*\\([^\\)\"\\']*$|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$|^\\s*\\{\\}$",
|
||||
"decreaseIndentPattern": "^\\s*(\\s*/[*].*[*]/\\s*)*\\}|^\\s*(\\s*/[*].*[*]/\\s*)*\\)|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$"
|
||||
},
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*#pragma\\s+region\\b",
|
||||
"end": "^\\s*#pragma\\s+endregion\\b"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,14 @@
|
||||
{
|
||||
"scopeName": "source.c.platform",
|
||||
"path": "./syntaxes/Platform.tmLanguage"
|
||||
}],
|
||||
"snippets": [{
|
||||
"language": "c",
|
||||
"path": "./snippets/c.json"
|
||||
},
|
||||
{
|
||||
"language": "cpp",
|
||||
"path": "./snippets/cpp.json"
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"#pragma region $0"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"#pragma endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"#pragma region $0"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"#pragma endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/atom/language-c/commit/0a57fd7ee32bd14e3ee8291434263d744a8ecf1e",
|
||||
"version": "https://github.com/atom/language-c/commit/9c0c5f202741a5647025db8d5df5fefba47b036c",
|
||||
"scopeName": "source.c",
|
||||
"fileTypes": [
|
||||
"c",
|
||||
@@ -780,7 +780,7 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -860,7 +860,7 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1013,7 +1013,7 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1050,7 +1050,7 @@
|
||||
"end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1110,7 +1110,7 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1147,7 +1147,7 @@
|
||||
"end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1194,7 +1194,7 @@
|
||||
"end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1253,7 +1253,7 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1355,7 +1355,7 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1444,7 +1444,7 @@
|
||||
"end": "(?=^\\s*((#)\\s*endif\\b))",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
@@ -1531,7 +1531,7 @@
|
||||
"end": "(?=^\\s*((#)\\s*endif\\b))",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))",
|
||||
"end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
|
||||
"name": "meta.preprocessor.c",
|
||||
"patterns": [
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#ifndef _UCRT
|
||||
#define _UCRT
|
||||
#endif
|
||||
@@ -100,24 +100,24 @@
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.c",
|
||||
"t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
|
||||
"r": {
|
||||
"dark_plus": "meta.preprocessor: #569CD6",
|
||||
"light_plus": "meta.preprocessor: #0000FF",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "meta.preprocessor: #569CD6"
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "endif",
|
||||
"t": "source.cpp meta.preprocessor.c entity.name.function.preprocessor.c",
|
||||
"t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,112 @@
|
||||
[
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "ifndef",
|
||||
"t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.preprocessor.c",
|
||||
"r": {
|
||||
"dark_plus": "meta.preprocessor: #569CD6",
|
||||
"light_plus": "meta.preprocessor: #0000FF",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "meta.preprocessor: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.c entity.name.function.preprocessor.c",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.macro.c keyword.control.directive.define.c punctuation.definition.directive.c",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "define",
|
||||
"t": "source.cpp meta.preprocessor.macro.c keyword.control.directive.define.c",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.preprocessor.macro.c",
|
||||
"r": {
|
||||
"dark_plus": "meta.preprocessor: #569CD6",
|
||||
"light_plus": "meta.preprocessor: #0000FF",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "meta.preprocessor: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.macro.c entity.name.function.preprocessor.c",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "endif",
|
||||
"t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -23,5 +23,11 @@
|
||||
["<", ">"],
|
||||
["'", "'"],
|
||||
["\"", "\""]
|
||||
]
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*#region\\b",
|
||||
"end": "^\\s*#endregion\\b"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,10 @@
|
||||
"scopeName": "source.cs",
|
||||
"path": "./syntaxes/csharp.tmLanguage.json"
|
||||
}
|
||||
]
|
||||
],
|
||||
"snippets": [{
|
||||
"language": "csharp",
|
||||
"path": "./snippets/csharp.json"
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"#region $0"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"#endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/2f2152632650d427e99e261f093d52b807abc72d",
|
||||
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/436456ee5ce44e29cb1752c3b29f493b1de08c42",
|
||||
"name": "C#",
|
||||
"scopeName": "source.cs",
|
||||
"fileTypes": [
|
||||
@@ -229,6 +229,9 @@
|
||||
{
|
||||
"include": "#yield-statement"
|
||||
},
|
||||
{
|
||||
"include": "#await-statement"
|
||||
},
|
||||
{
|
||||
"include": "#try-statement"
|
||||
},
|
||||
@@ -1606,6 +1609,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"await-statement": {
|
||||
"begin": "(?<!\\.)\\b(await)\\b",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.await.cs"
|
||||
}
|
||||
},
|
||||
"end": "(?=;)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
},
|
||||
"if-statement": {
|
||||
"begin": "(?<!\\.)\\b(if)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
|
||||
Vendored
+5
-5
@@ -7,11 +7,11 @@
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceRoot}"
|
||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
||||
],
|
||||
"stopOnEntry": false,
|
||||
"sourceMaps": true,
|
||||
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
|
||||
"outFiles": ["${workspaceFolder}/client/out/**/*.js"],
|
||||
"preLaunchTask": "npm"
|
||||
},
|
||||
{
|
||||
@@ -19,10 +19,10 @@
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/client/out/test" ],
|
||||
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/client/out/test" ],
|
||||
"stopOnEntry": false,
|
||||
"sourceMaps": true,
|
||||
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"],
|
||||
"outFiles": ["${workspaceFolder}/client/out/test/**/*.js"],
|
||||
"preLaunchTask": "npm"
|
||||
},
|
||||
{
|
||||
@@ -32,7 +32,7 @@
|
||||
"protocol": "legacy",
|
||||
"port": 6004,
|
||||
"sourceMaps": true,
|
||||
"outFiles": ["${workspaceRoot}/server/out/**/*.js"]
|
||||
"outFiles": ["${workspaceFolder}/server/out/**/*.js"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Available variables which can be used inside of strings.
|
||||
// ${workspaceRoot}: the root folder of the team
|
||||
// ${workspaceFolder}: the root folder of the team
|
||||
// ${file}: the current opened file
|
||||
// ${fileBasename}: the current opened file's basename
|
||||
// ${fileDirname}: the current opened file's dirname
|
||||
|
||||
@@ -6,27 +6,15 @@
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import { languages, window, commands, ExtensionContext, TextDocument, ColorRange, Color } from 'vscode';
|
||||
import { languages, window, commands, ExtensionContext, TextDocument, ColorInformation, ColorPresentation, Color } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, TextEdit } from 'vscode-languageclient';
|
||||
|
||||
import { ConfigurationFeature } from 'vscode-languageclient/lib/proposed';
|
||||
import { DocumentColorRequest } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
import { ConfigurationFeature } from 'vscode-languageclient/lib/configuration.proposed';
|
||||
import { DocumentColorRequest, DocumentColorParams, ColorPresentationRequest, ColorPresentationParams } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
let localize = nls.loadMessageBundle();
|
||||
|
||||
const CSSColorFormats = {
|
||||
Hex: '#{red:X}{green:X}{blue:X}',
|
||||
RGB: {
|
||||
opaque: 'rgb({red:d[0-255]}, {green:d[0-255]}, {blue:d[0-255]})',
|
||||
transparent: 'rgba({red:d[0-255]}, {green:d[0-255]}, {blue:d[0-255]}, {alpha})'
|
||||
},
|
||||
HSL: {
|
||||
opaque: 'hsl({hue:d[0-360]}, {saturation:d[0-100]}%, {luminance:d[0-100]}%)',
|
||||
transparent: 'hsla({hue:d[0-360]}, {saturation:d[0-100]}%, {luminance:d[0-100]}%, {alpha})'
|
||||
}
|
||||
};
|
||||
|
||||
// this method is called when vs code is activated
|
||||
export function activate(context: ExtensionContext) {
|
||||
|
||||
@@ -66,13 +54,30 @@ export function activate(context: ExtensionContext) {
|
||||
client.onReady().then(_ => {
|
||||
// register color provider
|
||||
context.subscriptions.push(languages.registerColorProvider(documentSelector, {
|
||||
provideDocumentColors(document: TextDocument): Thenable<ColorRange[]> {
|
||||
let params = client.code2ProtocolConverter.asDocumentSymbolParams(document);
|
||||
provideDocumentColors(document: TextDocument): Thenable<ColorInformation[]> {
|
||||
let params: DocumentColorParams = {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document)
|
||||
};
|
||||
return client.sendRequest(DocumentColorRequest.type, params).then(symbols => {
|
||||
return symbols.map(symbol => {
|
||||
let range = client.protocol2CodeConverter.asRange(symbol.range);
|
||||
let color = new Color(symbol.color.red * 255, symbol.color.green * 255, symbol.color.blue * 255, symbol.color.alpha);
|
||||
return new ColorRange(range, color, [CSSColorFormats.Hex, CSSColorFormats.RGB, CSSColorFormats.HSL]);
|
||||
let color = new Color(symbol.color.red, symbol.color.green, symbol.color.blue, symbol.color.alpha);
|
||||
return new ColorInformation(range, color);
|
||||
});
|
||||
});
|
||||
},
|
||||
provideColorPresentations(color: Color, context): ColorPresentation[] | Thenable<ColorPresentation[]> {
|
||||
let params: ColorPresentationParams = {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(context.document),
|
||||
color,
|
||||
range: client.code2ProtocolConverter.asRange(context.range)
|
||||
};
|
||||
return client.sendRequest(ColorPresentationRequest.type, params).then(presentations => {
|
||||
return presentations.map(p => {
|
||||
let presentation = new ColorPresentation(p.label);
|
||||
presentation.textEdit = p.textEdit && client.protocol2CodeConverter.asTextEdit(p.textEdit);
|
||||
presentation.additionalTextEdits = p.additionalTextEdits && client.protocol2CodeConverter.asTextEdits(p.additionalTextEdits);
|
||||
return presentation;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
declare module "color-convert" {
|
||||
module convert {
|
||||
module rgb {
|
||||
function hex(r: number, g: number, b: number);
|
||||
function hsl(r: number, g: number, b: number);
|
||||
function hvs(r: number, g: number, b: number);
|
||||
}
|
||||
}
|
||||
|
||||
export = convert;
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"outDir": "./out",
|
||||
"noUnusedLocals": true,
|
||||
"lib": [
|
||||
"es5", "es2015.promise"
|
||||
]
|
||||
|
||||
@@ -20,5 +20,11 @@
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
|
||||
"end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+12
-12
@@ -3,24 +3,24 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"vscode-jsonrpc": {
|
||||
"version": "3.3.1",
|
||||
"from": "vscode-jsonrpc@>=3.3.0 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.3.1.tgz"
|
||||
"version": "3.5.0-next.2",
|
||||
"from": "vscode-jsonrpc@3.5.0-next.2",
|
||||
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.5.0-next.2.tgz"
|
||||
},
|
||||
"vscode-languageclient": {
|
||||
"version": "3.4.0-next.17",
|
||||
"from": "vscode-languageclient@next",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.4.0-next.17.tgz"
|
||||
"version": "3.5.0-next.4",
|
||||
"from": "vscode-languageclient@3.5.0-next.4",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.5.0-next.4.tgz"
|
||||
},
|
||||
"vscode-languageserver-protocol": {
|
||||
"version": "3.1.1",
|
||||
"from": "vscode-languageserver-protocol@>=3.1.1 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.1.1.tgz"
|
||||
"version": "3.5.0-next.5",
|
||||
"from": "vscode-languageserver-protocol@3.5.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.5.0-next.5.tgz"
|
||||
},
|
||||
"vscode-languageserver-types": {
|
||||
"version": "3.3.0",
|
||||
"from": "vscode-languageserver-types@>=3.3.0 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.3.0.tgz"
|
||||
"version": "3.5.0-next.2",
|
||||
"from": "vscode-languageserver-types@3.5.0-next.2",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0-next.2.tgz"
|
||||
},
|
||||
"vscode-nls": {
|
||||
"version": "2.0.2",
|
||||
|
||||
+669
-687
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"css.title": "CSS",
|
||||
"css.lint.argumentsInColorFunction.desc": "Invalid number of parameters",
|
||||
"css.lint.boxModel.desc": "Do not use width or height when using padding or border",
|
||||
"css.lint.compatibleVendorPrefixes.desc": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties",
|
||||
@@ -20,6 +21,7 @@
|
||||
"css.trace.server.desc": "Traces the communication between VS Code and the CSS language server.",
|
||||
"css.validate.title": "Controls CSS validation and problem severities.",
|
||||
"css.validate.desc": "Enables or disables all validations",
|
||||
"less.title": "LESS",
|
||||
"less.lint.argumentsInColorFunction.desc": "Invalid number of parameters",
|
||||
"less.lint.boxModel.desc": "Do not use width or height when using padding or border",
|
||||
"less.lint.compatibleVendorPrefixes.desc": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties",
|
||||
@@ -40,6 +42,7 @@
|
||||
"less.lint.zeroUnits.desc": "No unit for zero needed",
|
||||
"less.validate.title": "Controls LESS validation and problem severities.",
|
||||
"less.validate.desc": "Enables or disables all validations",
|
||||
"scss.title": "SCSS (Sass)",
|
||||
"scss.lint.argumentsInColorFunction.desc": "Invalid number of parameters",
|
||||
"scss.lint.boxModel.desc": "Do not use width or height when using padding or border",
|
||||
"scss.lint.compatibleVendorPrefixes.desc": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties",
|
||||
|
||||
+4
-4
@@ -8,25 +8,25 @@
|
||||
"request": "attach",
|
||||
"port": 6004,
|
||||
"sourceMaps": true,
|
||||
"outDir": "${workspaceRoot}/out"
|
||||
"outDir": "${workspaceFolder}/out"
|
||||
},
|
||||
{
|
||||
"name": "Unit Tests",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/../../../node_modules/mocha/bin/_mocha",
|
||||
"program": "${workspaceFolder}/../../../node_modules/mocha/bin/_mocha",
|
||||
"stopOnEntry": false,
|
||||
"args": [
|
||||
"--timeout",
|
||||
"999999",
|
||||
"--colors"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"runtimeExecutable": null,
|
||||
"runtimeArgs": [],
|
||||
"env": {},
|
||||
"sourceMaps": true,
|
||||
"outDir": "${workspaceRoot}/out"
|
||||
"outDir": "${workspaceFolder}/out"
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
-15
@@ -3,29 +3,29 @@
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"vscode-css-languageservice": {
|
||||
"version": "2.1.4",
|
||||
"from": "vscode-css-languageservice@next",
|
||||
"resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.1.4.tgz"
|
||||
"version": "3.0.0",
|
||||
"from": "vscode-css-languageservice@3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-3.0.0.tgz"
|
||||
},
|
||||
"vscode-jsonrpc": {
|
||||
"version": "3.3.1",
|
||||
"from": "vscode-jsonrpc@>=3.3.0 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.3.1.tgz"
|
||||
"version": "3.5.0-next.2",
|
||||
"from": "vscode-jsonrpc@3.5.0-next.2",
|
||||
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.5.0-next.2.tgz"
|
||||
},
|
||||
"vscode-languageserver": {
|
||||
"version": "3.4.0-next.6",
|
||||
"from": "vscode-languageserver@next",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.4.0-next.6.tgz"
|
||||
"version": "3.5.0-next.6",
|
||||
"from": "vscode-languageserver@3.5.0-next.6",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.5.0-next.6.tgz"
|
||||
},
|
||||
"vscode-languageserver-protocol": {
|
||||
"version": "3.1.1",
|
||||
"from": "vscode-languageserver-protocol@>=3.1.1 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.1.1.tgz"
|
||||
"version": "3.5.0-next.5",
|
||||
"from": "vscode-languageserver-protocol@3.5.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.5.0-next.5.tgz"
|
||||
},
|
||||
"vscode-languageserver-types": {
|
||||
"version": "3.3.0",
|
||||
"from": "vscode-languageserver-types@>=3.3.0 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.3.0.tgz"
|
||||
"version": "3.5.0-next.2",
|
||||
"from": "vscode-languageserver-types@3.5.0-next.2d",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0-next.2.tgz"
|
||||
},
|
||||
"vscode-nls": {
|
||||
"version": "2.0.2",
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
"node": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-css-languageservice": "^2.1.4",
|
||||
"vscode-languageserver": "3.4.0-next.6",
|
||||
"vscode-languageserver-protocol": "^3.1.1"
|
||||
"vscode-css-languageservice": "3.0.0",
|
||||
"vscode-languageserver": "3.5.0-next.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^6.0.51"
|
||||
"@types/node": "7.0.43"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:css-server",
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
'use strict';
|
||||
|
||||
import {
|
||||
createConnection, IConnection, TextDocuments, TextDocument, InitializeParams, InitializeResult, ServerCapabilities
|
||||
createConnection, IConnection, TextDocuments, InitializeParams, InitializeResult, ServerCapabilities
|
||||
} from 'vscode-languageserver';
|
||||
|
||||
import { GetConfigurationRequest } from 'vscode-languageserver-protocol/lib/protocol.configuration.proposed';
|
||||
import { DocumentColorRequest, ServerCapabilities as CPServerCapabilities } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
import { TextDocument } from 'vscode-languageserver-types';
|
||||
|
||||
import { ConfigurationRequest } from 'vscode-languageserver-protocol/lib/protocol.configuration.proposed';
|
||||
import { DocumentColorRequest, ServerCapabilities as CPServerCapabilities, ColorPresentationRequest } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
|
||||
import { getCSSLanguageService, getSCSSLanguageService, getLESSLanguageService, LanguageSettings, LanguageService, Stylesheet } from 'vscode-css-languageservice';
|
||||
import { getLanguageModelCache } from './languageModelCache';
|
||||
@@ -96,7 +98,7 @@ function getDocumentSettings(textDocument: TextDocument): Thenable<LanguageSetti
|
||||
let promise = documentSettings[textDocument.uri];
|
||||
if (!promise) {
|
||||
let configRequestParam = { items: [{ scopeUri: textDocument.uri, section: textDocument.languageId }] };
|
||||
promise = connection.sendRequest(GetConfigurationRequest.type, configRequestParam).then(s => s[0]);
|
||||
promise = connection.sendRequest(ConfigurationRequest.type, configRequestParam).then(s => s[0]);
|
||||
documentSettings[textDocument.uri] = promise;
|
||||
}
|
||||
return promise;
|
||||
@@ -211,6 +213,15 @@ connection.onRequest(DocumentColorRequest.type, params => {
|
||||
return [];
|
||||
});
|
||||
|
||||
connection.onRequest(ColorPresentationRequest.type, params => {
|
||||
let document = documents.get(params.textDocument.uri);
|
||||
if (document) {
|
||||
let stylesheet = stylesheets.get(document);
|
||||
return getLanguageService(document).getColorPresentations(document, stylesheet, params.color, params.range);
|
||||
}
|
||||
return [];
|
||||
});
|
||||
|
||||
connection.onRenameRequest(renameParameters => {
|
||||
let document = documents.get(renameParameters.textDocument.uri);
|
||||
let stylesheet = stylesheets.get(document);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"outDir": "./out",
|
||||
"noUnusedLocals": true,
|
||||
"lib": [
|
||||
"es5"
|
||||
]
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -10,11 +10,11 @@
|
||||
"name": "Launch Extension",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceRoot}"
|
||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
||||
],
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Generated
+4
-4
@@ -38,9 +38,9 @@
|
||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz"
|
||||
},
|
||||
"vscode-emmet-helper": {
|
||||
"version": "1.1.7",
|
||||
"from": "vscode-emmet-helper@>=1.0.17 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-emmet-helper/-/vscode-emmet-helper-1.1.7.tgz"
|
||||
"version": "1.1.17",
|
||||
"from": "vscode-emmet-helper@>=1.1.17 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-emmet-helper/-/vscode-emmet-helper-1.1.17.tgz"
|
||||
},
|
||||
"vscode-languageserver-types": {
|
||||
"version": "3.3.0",
|
||||
@@ -53,4 +53,4 @@
|
||||
"resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,12 @@
|
||||
"url": "https://github.com/Microsoft/vscode-emmet"
|
||||
},
|
||||
"activationEvents": [
|
||||
"*"
|
||||
"*",
|
||||
"onCommand:emmet.expandAbbreviation",
|
||||
"onLanguage:html",
|
||||
"onLanguage:css",
|
||||
"onLanguage:scss",
|
||||
"onLanguage:less"
|
||||
],
|
||||
"main": "./out/extension",
|
||||
"contributes": {
|
||||
@@ -126,6 +131,34 @@
|
||||
"type": "string",
|
||||
"default": " ",
|
||||
"description": "%emmetPreferencesStylusBetween%"
|
||||
},
|
||||
"bem.elementSeparator": {
|
||||
"type": "string",
|
||||
"default": "__",
|
||||
"description": "%emmetPreferencesBemElementSeparator%"
|
||||
},
|
||||
"bem.modifierSeparator": {
|
||||
"type": "string",
|
||||
"default": "_",
|
||||
"description": "%emmetPreferencesBemModifierSeparator%"
|
||||
},
|
||||
"filter.commentBefore": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "%emmetPreferencesFilterCommentBefore%"
|
||||
},
|
||||
"filter.commentAfter": {
|
||||
"type": "string",
|
||||
"default": "\n<!-- /[#ID][.CLASS] -->",
|
||||
"description": "%emmetPreferencesFilterCommentAfter%"
|
||||
},
|
||||
"filter.commentTrigger": {
|
||||
"type": "array",
|
||||
"default": [
|
||||
"id",
|
||||
"class"
|
||||
],
|
||||
"description": "%emmetPreferencesFilterCommentTrigger%"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -258,16 +291,16 @@
|
||||
"compile": "gulp compile-extension:emmet"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^7.0.4",
|
||||
"@types/node": "7.0.43",
|
||||
"vscode": "1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emmetio/html-matcher": "^0.3.1",
|
||||
"@emmetio/css-parser": "ramya-rao-a/css-parser#vscode",
|
||||
"@emmetio/math-expression": "^0.1.1",
|
||||
"vscode-emmet-helper": "^1.1.7",
|
||||
"vscode-emmet-helper": "^1.1.17",
|
||||
"vscode-languageserver-types": "^3.0.3",
|
||||
"image-size": "^0.5.2",
|
||||
"vscode-nls": "2.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
"command.incrementNumberByTen": "Increment by 10",
|
||||
"command.decrementNumberByTen": "Decrement by 10",
|
||||
"emmetSyntaxProfiles": "Define profile for specified syntax or use your own profile with specific rules.",
|
||||
"emmetExclude": "An array of languages where emmet abbreviations should not be expanded.",
|
||||
"emmetExtensionsPath": "Path to a folder containing emmet profiles and snippets.'",
|
||||
"emmetShowExpandedAbbreviation": "Shows expanded emmet abbreviations as suggestions.\nThe option \"inMarkupAndStylesheetFilesOnly\" applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option \"always\" applies to all parts of the file regardless of markup/css.",
|
||||
"emmetShowAbbreviationSuggestions": "Shows possible emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to \"never\".",
|
||||
"emmetIncludeLanguages": "Enable emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and emmet supported language.\n Eg: {\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}",
|
||||
"emmetVariables": "Variables to be used in emmet snippets",
|
||||
"emmetTriggerExpansionOnTab": "When enabled, emmet abbreviations are expanded when pressing TAB.",
|
||||
"emmetExclude": "An array of languages where Emmet abbreviations should not be expanded.",
|
||||
"emmetExtensionsPath": "Path to a folder containing Emmet profiles and snippets.'",
|
||||
"emmetShowExpandedAbbreviation": "Shows expanded Emmet abbreviations as suggestions.\nThe option \"inMarkupAndStylesheetFilesOnly\" applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option \"always\" applies to all parts of the file regardless of markup/css.",
|
||||
"emmetShowAbbreviationSuggestions": "Shows possible Emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to \"never\".",
|
||||
"emmetIncludeLanguages": "Enable Emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and emmet supported language.\n Eg: {\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}",
|
||||
"emmetVariables": "Variables to be used in Emmet snippets",
|
||||
"emmetTriggerExpansionOnTab": "When enabled, Emmet abbreviations are expanded when pressing TAB.",
|
||||
"emmetPreferences": "Preferences used to modify behavior of some actions and resolvers of Emmet.",
|
||||
"emmetPreferencesIntUnit": "Default unit for integer values",
|
||||
"emmetPreferencesFloatUnit": "Default unit for float values",
|
||||
@@ -39,5 +39,10 @@
|
||||
"emmetPreferencesCssBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations",
|
||||
"emmetPreferencesSassBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Sass files",
|
||||
"emmetPreferencesStylusBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Stylus files",
|
||||
"emmetShowSuggestionsAsSnippets": "If true, then emmet suggestions will show up as snippets allowing you to order them as per editor.snippetSuggestions setting."
|
||||
}
|
||||
"emmetShowSuggestionsAsSnippets": "If true, then Emmet suggestions will show up as snippets allowing you to order them as per editor.snippetSuggestions setting.",
|
||||
"emmetPreferencesBemElementSeparator": "Element separator used for classes when using the BEM filter",
|
||||
"emmetPreferencesBemModifierSeparator": "Modifier separator used for classes when using the BEM filter",
|
||||
"emmetPreferencesFilterCommentBefore": "A definition of comment that should be placed before matched element when comment filter is applied.",
|
||||
"emmetPreferencesFilterCommentAfter": "A definition of comment that should be placed after matched element when comment filter is applied.",
|
||||
"emmetPreferencesFilterCommentTrigger": "A comma-separated list of attribute names that should exist in abbreviation for the comment filter to be applied"
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { Node, HtmlNode, Rule } from 'EmmetNode';
|
||||
import { getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, validate, getEmmetConfiguration } from './util';
|
||||
import { getExpandOptions, extractAbbreviation, extractAbbreviationFromText, isStyleSheet, isAbbreviationValid, getEmmetMode, expandAbbreviation } from 'vscode-emmet-helper';
|
||||
import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode } from './util';
|
||||
|
||||
const trimRegex = /[\u00a0]*[\d|#|\-|\*|\u2022]+\.?/;
|
||||
|
||||
@@ -18,17 +17,18 @@ interface ExpandAbbreviationInput {
|
||||
filter?: string;
|
||||
}
|
||||
|
||||
export function wrapWithAbbreviation(args) {
|
||||
if (!validate(false)) {
|
||||
export function wrapWithAbbreviation(args: any) {
|
||||
if (!validate(false) || !vscode.window.activeTextEditor) {
|
||||
return;
|
||||
}
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
const abbreviationPromise = (args && args['abbreviation']) ? Promise.resolve(args['abbreviation']) : vscode.window.showInputBox({ prompt: 'Enter Abbreviation' });
|
||||
const syntax = getSyntaxFromArgs({ language: editor.document.languageId });
|
||||
const helper = getEmmetHelper();
|
||||
|
||||
return abbreviationPromise.then(abbreviation => {
|
||||
if (!abbreviation || !abbreviation.trim() || !isAbbreviationValid(syntax, abbreviation)) { return; }
|
||||
if (!abbreviation || !abbreviation.trim() || !helper.isAbbreviationValid(syntax, abbreviation)) { return; }
|
||||
|
||||
let expandAbbrList: ExpandAbbreviationInput[] = [];
|
||||
|
||||
@@ -50,8 +50,8 @@ export function wrapWithAbbreviation(args) {
|
||||
});
|
||||
}
|
||||
|
||||
export function wrapIndividualLinesWithAbbreviation(args) {
|
||||
if (!validate(false)) {
|
||||
export function wrapIndividualLinesWithAbbreviation(args: any) {
|
||||
if (!validate(false) || !vscode.window.activeTextEditor) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,11 +64,12 @@ export function wrapIndividualLinesWithAbbreviation(args) {
|
||||
const abbreviationPromise = (args && args['abbreviation']) ? Promise.resolve(args['abbreviation']) : vscode.window.showInputBox({ prompt: 'Enter Abbreviation' });
|
||||
const syntax = getSyntaxFromArgs({ language: editor.document.languageId });
|
||||
const lines = editor.document.getText(editor.selection).split('\n').map(x => x.trim());
|
||||
const helper = getEmmetHelper();
|
||||
|
||||
return abbreviationPromise.then(inputAbbreviation => {
|
||||
if (!inputAbbreviation || !inputAbbreviation.trim() || !isAbbreviationValid(syntax, inputAbbreviation)) { return; }
|
||||
if (!inputAbbreviation || !inputAbbreviation.trim() || !helper.isAbbreviationValid(syntax, inputAbbreviation)) { return; }
|
||||
|
||||
let extractedResults = extractAbbreviationFromText(inputAbbreviation);
|
||||
let extractedResults = helper.extractAbbreviationFromText(inputAbbreviation);
|
||||
if (!extractedResults) {
|
||||
return;
|
||||
}
|
||||
@@ -87,7 +88,7 @@ export function wrapIndividualLinesWithAbbreviation(args) {
|
||||
|
||||
}
|
||||
|
||||
export function expandEmmetAbbreviation(args): Thenable<boolean> {
|
||||
export function expandEmmetAbbreviation(args: any): Thenable<boolean> {
|
||||
const syntax = getSyntaxFromArgs(args);
|
||||
if (!syntax || !validate()) {
|
||||
return fallbackTab();
|
||||
@@ -105,12 +106,13 @@ export function expandEmmetAbbreviation(args): Thenable<boolean> {
|
||||
let abbreviationList: ExpandAbbreviationInput[] = [];
|
||||
let firstAbbreviation: string;
|
||||
let allAbbreviationsSame: boolean = true;
|
||||
const helper = getEmmetHelper();
|
||||
|
||||
let getAbbreviation = (document: vscode.TextDocument, selection: vscode.Selection, position: vscode.Position, syntax: string): [vscode.Range, string, string] => {
|
||||
let rangeToReplace: vscode.Range = selection;
|
||||
let abbr = document.getText(rangeToReplace);
|
||||
if (!rangeToReplace.isEmpty) {
|
||||
let extractedResults = extractAbbreviationFromText(abbr);
|
||||
let extractedResults = helper.extractAbbreviationFromText(abbr);
|
||||
if (extractedResults) {
|
||||
return [rangeToReplace, extractedResults.abbreviation, extractedResults.filter];
|
||||
}
|
||||
@@ -130,7 +132,7 @@ export function expandEmmetAbbreviation(args): Thenable<boolean> {
|
||||
return [rangeToReplace, abbr, ''];
|
||||
}
|
||||
}
|
||||
let extractedResults = extractAbbreviation(editor.document, position, false);
|
||||
let extractedResults = helper.extractAbbreviation(editor.document, position, false);
|
||||
if (!extractedResults) {
|
||||
return [null, '', ''];
|
||||
}
|
||||
@@ -139,17 +141,24 @@ export function expandEmmetAbbreviation(args): Thenable<boolean> {
|
||||
return [new vscode.Range(abbreviationRange.start.line, abbreviationRange.start.character, abbreviationRange.end.line, abbreviationRange.end.character), abbreviation, filter];
|
||||
};
|
||||
|
||||
editor.selections.forEach(selection => {
|
||||
let selectionsInReverseOrder = editor.selections.slice(0);
|
||||
selectionsInReverseOrder.sort((a, b) => {
|
||||
var posA = a.isReversed ? a.anchor : a.active;
|
||||
var posB = b.isReversed ? b.anchor : b.active;
|
||||
return posA.compareTo(posB) * -1;
|
||||
});
|
||||
|
||||
selectionsInReverseOrder.forEach(selection => {
|
||||
let position = selection.isReversed ? selection.anchor : selection.active;
|
||||
let [rangeToReplace, abbreviation, filter] = getAbbreviation(editor.document, selection, position, syntax);
|
||||
if (!rangeToReplace) {
|
||||
return;
|
||||
}
|
||||
if (!isAbbreviationValid(syntax, abbreviation)) {
|
||||
if (!helper.isAbbreviationValid(syntax, abbreviation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let currentNode = getNode(rootNode, position);
|
||||
let currentNode = getNode(rootNode, position, true);
|
||||
if (!isValidLocationForEmmetAbbreviation(currentNode, syntax, position)) {
|
||||
return;
|
||||
}
|
||||
@@ -170,7 +179,7 @@ export function expandEmmetAbbreviation(args): Thenable<boolean> {
|
||||
});
|
||||
}
|
||||
|
||||
function fallbackTab(): Thenable<boolean> {
|
||||
function fallbackTab(): Thenable<boolean | undefined> | undefined {
|
||||
if (vscode.workspace.getConfiguration('emmet')['triggerExpansionOnTab'] === true) {
|
||||
return vscode.commands.executeCommand('tab');
|
||||
}
|
||||
@@ -189,7 +198,6 @@ export function isValidLocationForEmmetAbbreviation(currentNode: Node, syntax: s
|
||||
}
|
||||
|
||||
if (isStyleSheet(syntax)) {
|
||||
|
||||
// If current node is a rule or at-rule, then perform additional checks to ensure
|
||||
// emmet suggestions are not provided in the rule selector
|
||||
if (currentNode.type !== 'rule' && currentNode.type !== 'at-rule') {
|
||||
@@ -218,7 +226,8 @@ export function isValidLocationForEmmetAbbreviation(currentNode: Node, syntax: s
|
||||
|
||||
const currentHtmlNode = <HtmlNode>currentNode;
|
||||
if (currentHtmlNode.close) {
|
||||
return getInnerRange(currentHtmlNode).contains(position);
|
||||
const innerRange = getInnerRange(currentHtmlNode);
|
||||
return !!innerRange && innerRange.contains(position);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -239,7 +248,7 @@ function expandAbbreviationInRange(editor: vscode.TextEditor, expandAbbrList: Ex
|
||||
// Snippet to replace at multiple cursors are not the same
|
||||
// `editor.insertSnippet` will have to be called for each instance separately
|
||||
// We will not be able to maintain multiple cursors after snippet insertion
|
||||
let insertPromises = [];
|
||||
let insertPromises: Thenable<boolean>[] = [];
|
||||
if (!insertSameSnippet) {
|
||||
expandAbbrList.forEach((expandAbbrInput: ExpandAbbreviationInput) => {
|
||||
let expandedText = expandAbbr(expandAbbrInput);
|
||||
@@ -270,8 +279,9 @@ function expandAbbreviationInRange(editor: vscode.TextEditor, expandAbbrList: Ex
|
||||
/**
|
||||
* Expands abbreviation as detailed in given input.
|
||||
*/
|
||||
function expandAbbr(input: ExpandAbbreviationInput): string {
|
||||
const expandOptions = getExpandOptions(input.syntax, getEmmetConfiguration(input.syntax), input.filter);
|
||||
function expandAbbr(input: ExpandAbbreviationInput): string | undefined {
|
||||
const helper = getEmmetHelper();
|
||||
const expandOptions = helper.getExpandOptions(input.syntax, getEmmetConfiguration(input.syntax), input.filter);
|
||||
|
||||
if (input.textToWrap) {
|
||||
if (input.filter && input.filter.indexOf('t') > -1) {
|
||||
@@ -291,7 +301,7 @@ function expandAbbr(input: ExpandAbbreviationInput): string {
|
||||
|
||||
try {
|
||||
// Expand the abbreviation
|
||||
let expandedText = expandAbbreviation(input.abbreviation, expandOptions);
|
||||
let expandedText = helper.expandAbbreviation(input.abbreviation, expandOptions);
|
||||
|
||||
if (input.textToWrap) {
|
||||
// All $anyword would have been escaped by the emmet helper.
|
||||
@@ -313,7 +323,7 @@ function expandAbbr(input: ExpandAbbreviationInput): string {
|
||||
|
||||
}
|
||||
|
||||
function getSyntaxFromArgs(args: any): string {
|
||||
function getSyntaxFromArgs(args: any): string | undefined {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
if (!editor) {
|
||||
vscode.window.showInformationMessage('No editor is active.');
|
||||
|
||||
@@ -16,11 +16,10 @@ export function balanceIn() {
|
||||
}
|
||||
|
||||
function balance(out: boolean) {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
if (!validate(false)) {
|
||||
if (!validate(false) || !vscode.window.activeTextEditor) {
|
||||
return;
|
||||
}
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
let rootNode = <HtmlNode>parseDocument(editor.document);
|
||||
if (!rootNode) {
|
||||
return;
|
||||
@@ -30,7 +29,7 @@ function balance(out: boolean) {
|
||||
let newSelections: vscode.Selection[] = [];
|
||||
editor.selections.forEach(selection => {
|
||||
let range = getRangeFunction(editor.document, selection, rootNode);
|
||||
newSelections.push(range ? range : selection);
|
||||
newSelections.push(range);
|
||||
});
|
||||
|
||||
editor.selection = newSelections[0];
|
||||
@@ -40,7 +39,7 @@ function balance(out: boolean) {
|
||||
function getRangeToBalanceOut(document: vscode.TextDocument, selection: vscode.Selection, rootNode: HtmlNode): vscode.Selection {
|
||||
let nodeToBalance = <HtmlNode>getNode(rootNode, selection.start);
|
||||
if (!nodeToBalance) {
|
||||
return;
|
||||
return selection;
|
||||
}
|
||||
if (!nodeToBalance.close) {
|
||||
return new vscode.Selection(nodeToBalance.start, nodeToBalance.end);
|
||||
@@ -55,13 +54,13 @@ function getRangeToBalanceOut(document: vscode.TextDocument, selection: vscode.S
|
||||
if (outerSelection.contains(selection) && !outerSelection.isEqual(selection)) {
|
||||
return outerSelection;
|
||||
}
|
||||
return;
|
||||
return selection;
|
||||
}
|
||||
|
||||
function getRangeToBalanceIn(document: vscode.TextDocument, selection: vscode.Selection, rootNode: HtmlNode): vscode.Selection {
|
||||
let nodeToBalance = <HtmlNode>getNode(rootNode, selection.start, true);
|
||||
if (!nodeToBalance) {
|
||||
return;
|
||||
return selection;
|
||||
}
|
||||
|
||||
if (selection.start.isEqual(nodeToBalance.start)
|
||||
@@ -71,7 +70,7 @@ function getRangeToBalanceIn(document: vscode.TextDocument, selection: vscode.Se
|
||||
}
|
||||
|
||||
if (!nodeToBalance.firstChild) {
|
||||
return;
|
||||
return selection;
|
||||
}
|
||||
|
||||
if (selection.start.isEqual(nodeToBalance.firstChild.start)
|
||||
|
||||
@@ -43,20 +43,16 @@ export class DocumentStreamReader {
|
||||
|
||||
/**
|
||||
* Creates a new stream instance which is limited to given range for given document
|
||||
* @param {Position} start
|
||||
* @param {Position} end
|
||||
* @return {DocumentStreamReader}
|
||||
*/
|
||||
limit(start, end) {
|
||||
limit(start: Position, end: Position): DocumentStreamReader {
|
||||
return new DocumentStreamReader(this.document, start, new Range(start, end));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next character code in the stream without advancing it.
|
||||
* Will return NaN at the end of the file.
|
||||
* @returns {Number}
|
||||
*/
|
||||
peek() {
|
||||
peek(): number {
|
||||
if (this.eof()) {
|
||||
return NaN;
|
||||
}
|
||||
@@ -67,9 +63,8 @@ export class DocumentStreamReader {
|
||||
/**
|
||||
* Returns the next character in the stream and advances it.
|
||||
* Also returns NaN when no more characters are available.
|
||||
* @returns {Number}
|
||||
*/
|
||||
next() {
|
||||
next(): number {
|
||||
if (this.eof()) {
|
||||
return NaN;
|
||||
}
|
||||
@@ -95,9 +90,8 @@ export class DocumentStreamReader {
|
||||
/**
|
||||
* Backs up the stream n characters. Backing it up further than the
|
||||
* start of the current token will cause things to break, so be careful.
|
||||
* @param {Number} n
|
||||
*/
|
||||
backUp(n) {
|
||||
backUp(n: number) {
|
||||
let row = this.pos.line;
|
||||
let column = this.pos.character;
|
||||
column -= (n || 1);
|
||||
@@ -117,28 +111,22 @@ export class DocumentStreamReader {
|
||||
/**
|
||||
* Get the string between the start of the current token and the
|
||||
* current stream position.
|
||||
* @returns {String}
|
||||
*/
|
||||
current() {
|
||||
current(): string {
|
||||
return this.substring(this.start, this.pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns contents for given range
|
||||
* @param {Position} from
|
||||
* @param {Position} to
|
||||
* @return {String}
|
||||
*/
|
||||
substring(from, to) {
|
||||
substring(from: Position, to: Position): string {
|
||||
return this.document.getText(new Range(from, to));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates error object with current stream state
|
||||
* @param {String} message
|
||||
* @return {Error}
|
||||
*/
|
||||
error(message) {
|
||||
error(message: string): Error {
|
||||
const err = new Error(`${message} at row ${this.pos.line}, column ${this.pos.character}`);
|
||||
|
||||
return err;
|
||||
@@ -146,10 +134,8 @@ export class DocumentStreamReader {
|
||||
|
||||
/**
|
||||
* Returns line length of given row, including line ending
|
||||
* @param {Number} row
|
||||
* @return {Number}
|
||||
*/
|
||||
_lineLength(row) {
|
||||
_lineLength(row: number): number {
|
||||
if (row === this.document.lineCount - 1) {
|
||||
return this.document.lineAt(row).text.length;
|
||||
}
|
||||
@@ -161,10 +147,8 @@ export class DocumentStreamReader {
|
||||
* and returns a boolean. If the next character in the stream 'matches'
|
||||
* the given argument, it is consumed and returned.
|
||||
* Otherwise, `false` is returned.
|
||||
* @param {Number|Function} match
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
eat(match) {
|
||||
eat(match: number | Function): boolean {
|
||||
const ch = this.peek();
|
||||
const ok = typeof match === 'function' ? match(ch) : ch === match;
|
||||
|
||||
@@ -178,10 +162,8 @@ export class DocumentStreamReader {
|
||||
/**
|
||||
* Repeatedly calls <code>eat</code> with the given argument, until it
|
||||
* fails. Returns <code>true</code> if any characters were eaten.
|
||||
* @param {Object} match
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
eatWhile(match) {
|
||||
eatWhile(match: number | Function): boolean {
|
||||
const start = this.pos;
|
||||
while (!this.eof() && this.eat(match)) { }
|
||||
return !this.pos.isEqual(start);
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { HtmlNode } from 'EmmetNode';
|
||||
import { doComplete, isStyleSheet, getEmmetMode, extractAbbreviation } from 'vscode-emmet-helper';
|
||||
import { isValidLocationForEmmetAbbreviation } from './abbreviationActions';
|
||||
import { getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, getEmmetConfiguration } from './util';
|
||||
import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, getEmmetConfiguration, getEmmetMode, isStyleSheet } from './util';
|
||||
|
||||
const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-template', 'text/template'];
|
||||
|
||||
export class DefaultCompletionItemProvider implements vscode.CompletionItemProvider {
|
||||
|
||||
public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable<vscode.CompletionList> {
|
||||
public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable<vscode.CompletionList | undefined> | undefined {
|
||||
const mappedLanguages = getMappingForIncludedLanguages();
|
||||
const emmetConfig = vscode.workspace.getConfiguration('emmet');
|
||||
|
||||
@@ -31,20 +32,21 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
return;
|
||||
}
|
||||
|
||||
const helper = getEmmetHelper();
|
||||
let noiseCheckPromise: Thenable<any> = Promise.resolve();
|
||||
|
||||
// Fix for https://github.com/Microsoft/vscode/issues/32647
|
||||
// Check for document symbols in js/ts/jsx/tsx and avoid triggering emmet for abbreviations of the form symbolName.sometext
|
||||
// Presence of > or * or + in the abbreviation denotes valid abbreviation that should trigger emmet
|
||||
if (!isStyleSheet(syntax) && (document.languageId === 'javascript' || document.languageId === 'javascriptreact' || document.languageId === 'typescript' || document.languageId === 'typescriptreact')) {
|
||||
let extractAbbreviationResults = extractAbbreviation(document, position);
|
||||
let extractAbbreviationResults = helper.extractAbbreviation(document, position);
|
||||
if (extractAbbreviationResults) {
|
||||
let abbreviation: string = extractAbbreviationResults.abbreviation;
|
||||
if (abbreviation.startsWith('this.')) {
|
||||
noiseCheckPromise = Promise.resolve(true);
|
||||
} else {
|
||||
noiseCheckPromise = vscode.commands.executeCommand('vscode.executeDocumentSymbolProvider', document.uri).then((symbols: vscode.SymbolInformation[]) => {
|
||||
return symbols.find(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation)));
|
||||
noiseCheckPromise = vscode.commands.executeCommand<vscode.SymbolInformation[]>('vscode.executeDocumentSymbolProvider', document.uri).then((symbols: vscode.SymbolInformation[] | undefined) => {
|
||||
return symbols && symbols.find(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation)));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -55,7 +57,7 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
return;
|
||||
}
|
||||
|
||||
let result: vscode.CompletionList = doComplete(document, position, syntax, getEmmetConfiguration(syntax));
|
||||
let result = helper.doComplete(document, position, syntax, getEmmetConfiguration(syntax));
|
||||
let newItems: vscode.CompletionItem[] = [];
|
||||
if (result && result.items) {
|
||||
result.items.forEach(item => {
|
||||
@@ -86,7 +88,7 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
* @param document vscode.Textdocument
|
||||
* @param position vscode.Position position of the abbreviation that needs to be expanded
|
||||
*/
|
||||
private syntaxHelper(syntax: string, document: vscode.TextDocument, position: vscode.Position): string {
|
||||
private syntaxHelper(syntax: string | undefined, document: vscode.TextDocument, position: vscode.Position): string | undefined {
|
||||
if (!syntax) {
|
||||
return syntax;
|
||||
}
|
||||
@@ -95,7 +97,7 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
return;
|
||||
}
|
||||
|
||||
let currentNode = getNode(rootNode, position);
|
||||
let currentNode = getNode(rootNode, position, true);
|
||||
|
||||
if (!isStyleSheet(syntax)) {
|
||||
const currentHtmlNode = <HtmlNode>currentNode;
|
||||
@@ -106,6 +108,10 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
return 'css';
|
||||
}
|
||||
if (currentHtmlNode.name === 'script') {
|
||||
if (currentHtmlNode.attributes
|
||||
&& currentHtmlNode.attributes.some(x => x.name.toString() === 'type' && allowedMimeTypesInScriptTag.indexOf(x.value.toString()) > -1)) {
|
||||
return syntax;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,40 +7,42 @@ import * as vscode from 'vscode';
|
||||
import { validate } from './util';
|
||||
|
||||
export function fetchEditPoint(direction: string): void {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
if (!validate()) {
|
||||
if (!validate() || !vscode.window.activeTextEditor) {
|
||||
return;
|
||||
}
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
|
||||
let newSelections: vscode.Selection[] = [];
|
||||
editor.selections.forEach(selection => {
|
||||
let updatedSelection = direction === 'next' ? nextEditPoint(selection.anchor, editor) : prevEditPoint(selection.anchor, editor);
|
||||
newSelections.push(updatedSelection ? updatedSelection : selection);
|
||||
let updatedSelection = direction === 'next' ? nextEditPoint(selection, editor) : prevEditPoint(selection, editor);
|
||||
newSelections.push(updatedSelection);
|
||||
});
|
||||
editor.selections = newSelections;
|
||||
editor.revealRange(editor.selections[editor.selections.length - 1]);
|
||||
}
|
||||
|
||||
function nextEditPoint(position: vscode.Position, editor: vscode.TextEditor): vscode.Selection {
|
||||
for (let lineNum = position.line; lineNum < editor.document.lineCount; lineNum++) {
|
||||
let updatedSelection = findEditPoint(lineNum, editor, position, 'next');
|
||||
function nextEditPoint(selection: vscode.Selection, editor: vscode.TextEditor): vscode.Selection {
|
||||
for (let lineNum = selection.anchor.line; lineNum < editor.document.lineCount; lineNum++) {
|
||||
let updatedSelection = findEditPoint(lineNum, editor, selection.anchor, 'next');
|
||||
if (updatedSelection) {
|
||||
return updatedSelection;
|
||||
}
|
||||
}
|
||||
return selection;
|
||||
}
|
||||
|
||||
function prevEditPoint(position: vscode.Position, editor: vscode.TextEditor): vscode.Selection {
|
||||
for (let lineNum = position.line; lineNum >= 0; lineNum--) {
|
||||
let updatedSelection = findEditPoint(lineNum, editor, position, 'prev');
|
||||
function prevEditPoint(selection: vscode.Selection, editor: vscode.TextEditor): vscode.Selection {
|
||||
for (let lineNum = selection.anchor.line; lineNum >= 0; lineNum--) {
|
||||
let updatedSelection = findEditPoint(lineNum, editor, selection.anchor, 'prev');
|
||||
if (updatedSelection) {
|
||||
return updatedSelection;
|
||||
}
|
||||
}
|
||||
return selection;
|
||||
}
|
||||
|
||||
|
||||
function findEditPoint(lineNum: number, editor: vscode.TextEditor, position: vscode.Position, direction: string): vscode.Selection {
|
||||
function findEditPoint(lineNum: number, editor: vscode.TextEditor, position: vscode.Position, direction: string): vscode.Selection | undefined {
|
||||
let line = editor.document.lineAt(lineNum);
|
||||
let lineContent = line.text;
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ import evaluate from '@emmetio/math-expression';
|
||||
import { DocumentStreamReader } from './bufferStream';
|
||||
|
||||
export function evaluateMathExpression() {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
if (!editor) {
|
||||
if (!vscode.window.activeTextEditor) {
|
||||
vscode.window.showInformationMessage('No editor is active');
|
||||
return;
|
||||
}
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
const stream = new DocumentStreamReader(editor.document);
|
||||
editor.edit(editBuilder => {
|
||||
editor.selections.forEach(selection => {
|
||||
|
||||
@@ -17,13 +17,10 @@ import { fetchEditPoint } from './editPoint';
|
||||
import { fetchSelectItem } from './selectItem';
|
||||
import { evaluateMathExpression } from './evaluateMathExpression';
|
||||
import { incrementDecrement } from './incrementDecrement';
|
||||
import { LANGUAGE_MODES, getMappingForIncludedLanguages } from './util';
|
||||
import { updateExtensionsPath } from 'vscode-emmet-helper';
|
||||
import { LANGUAGE_MODES, getMappingForIncludedLanguages, resolveUpdateExtensionsPath } from './util';
|
||||
import { updateImageSize } from './updateImageSize';
|
||||
import { reflectCssValue } from './reflectCssValue';
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
registerCompletionProviders(context);
|
||||
|
||||
@@ -128,18 +125,6 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
return reflectCssValue();
|
||||
}));
|
||||
|
||||
let currentExtensionsPath = undefined;
|
||||
let resolveUpdateExtensionsPath = () => {
|
||||
let extensionsPath = vscode.workspace.getConfiguration('emmet')['extensionsPath'];
|
||||
if (extensionsPath && !path.isAbsolute(extensionsPath)) {
|
||||
extensionsPath = path.join(vscode.workspace.rootPath, extensionsPath);
|
||||
}
|
||||
if (currentExtensionsPath !== extensionsPath) {
|
||||
currentExtensionsPath = extensionsPath;
|
||||
updateExtensionsPath(currentExtensionsPath).then(null, err => vscode.window.showErrorMessage(err));
|
||||
}
|
||||
};
|
||||
|
||||
resolveUpdateExtensionsPath();
|
||||
|
||||
context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(() => {
|
||||
|
||||
@@ -19,20 +19,16 @@ const reUrl = /^https?:/;
|
||||
/**
|
||||
* Get size of given image file. Supports files from local filesystem,
|
||||
* as well as URLs
|
||||
* @param {String} file Path to local file or URL
|
||||
* @return {Promise}
|
||||
*/
|
||||
export function getImageSize(file) {
|
||||
export function getImageSize(file: string) {
|
||||
file = file.replace(/^file:\/\//, '');
|
||||
return reUrl.test(file) ? getImageSizeFromURL(file) : getImageSizeFromFile(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image size from file on local file system
|
||||
* @param {String} file
|
||||
* @return {Promise}
|
||||
*/
|
||||
function getImageSizeFromFile(file) {
|
||||
function getImageSizeFromFile(file: string) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const isDataUrl = file.match(/^data:.+?;base64,/);
|
||||
|
||||
@@ -46,7 +42,7 @@ function getImageSizeFromFile(file) {
|
||||
}
|
||||
}
|
||||
|
||||
sizeOf(file, (err, size) => {
|
||||
sizeOf(file, (err: any, size: any) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
@@ -58,15 +54,13 @@ function getImageSizeFromFile(file) {
|
||||
|
||||
/**
|
||||
* Get image size from given remove URL
|
||||
* @param {String} url
|
||||
* @return {Promise}
|
||||
*/
|
||||
function getImageSizeFromURL(url) {
|
||||
function getImageSizeFromURL(urlStr: string) {
|
||||
return new Promise((resolve, reject) => {
|
||||
url = parseUrl(url);
|
||||
const url = parseUrl(urlStr);
|
||||
const getTransport = url.protocol === 'https:' ? https.get : http.get;
|
||||
|
||||
getTransport(url, resp => {
|
||||
getTransport(url as any, resp => {
|
||||
const chunks = [];
|
||||
let bufSize = 0;
|
||||
|
||||
@@ -102,11 +96,8 @@ function getImageSizeFromURL(url) {
|
||||
/**
|
||||
* Returns size object for given file name. If file name contains `@Nx` token,
|
||||
* the final dimentions will be downscaled by N
|
||||
* @param {String} fileName
|
||||
* @param {Object} size
|
||||
* @return {Object}
|
||||
*/
|
||||
function sizeForFileName(fileName, size) {
|
||||
function sizeForFileName(fileName: string, size: any) {
|
||||
const m = fileName.match(/@(\d+)x\./);
|
||||
const scale = m ? +m[1] : 1;
|
||||
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { validate, parseDocument } from './util';
|
||||
import { validate, parseDocument, isStyleSheet } from './util';
|
||||
import { nextItemHTML, prevItemHTML } from './selectItemHTML';
|
||||
import { nextItemStylesheet, prevItemStylesheet } from './selectItemStylesheet';
|
||||
import { isStyleSheet } from 'vscode-emmet-helper';
|
||||
|
||||
|
||||
export function fetchSelectItem(direction: string): void {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
|
||||
@@ -7,9 +7,9 @@ import * as vscode from 'vscode';
|
||||
import { getDeepestNode, findNextWord, findPrevWord, getNode } from './util';
|
||||
import { HtmlNode } from 'EmmetNode';
|
||||
|
||||
export function nextItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: HtmlNode): vscode.Selection {
|
||||
export function nextItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: HtmlNode): vscode.Selection | undefined {
|
||||
let currentNode = <HtmlNode>getNode(rootNode, selectionEnd);
|
||||
let nextNode: HtmlNode;
|
||||
let nextNode: HtmlNode | undefined = undefined;
|
||||
|
||||
if (!currentNode) {
|
||||
return;
|
||||
@@ -50,12 +50,12 @@ export function nextItemHTML(selectionStart: vscode.Position, selectionEnd: vsco
|
||||
}
|
||||
}
|
||||
|
||||
return getSelectionFromNode(nextNode, editor.document);
|
||||
return nextNode && getSelectionFromNode(nextNode, editor.document);
|
||||
}
|
||||
|
||||
export function prevItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: HtmlNode): vscode.Selection {
|
||||
export function prevItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: HtmlNode): vscode.Selection | undefined {
|
||||
let currentNode = <HtmlNode>getNode(rootNode, selectionStart);
|
||||
let prevNode: HtmlNode;
|
||||
let prevNode: HtmlNode | undefined = undefined;
|
||||
|
||||
if (!currentNode) {
|
||||
return;
|
||||
@@ -68,7 +68,7 @@ export function prevItemHTML(selectionStart: vscode.Position, selectionEnd: vsco
|
||||
} else {
|
||||
// Select the child that appears just before the cursor and is not a comment
|
||||
prevNode = currentNode.firstChild;
|
||||
let oldOption: HtmlNode;
|
||||
let oldOption: HtmlNode | undefined = undefined;
|
||||
while (prevNode.nextSibling && selectionStart.isAfterOrEqual(prevNode.nextSibling.end)) {
|
||||
if (prevNode && prevNode.type !== 'comment') {
|
||||
oldOption = prevNode;
|
||||
@@ -94,20 +94,25 @@ export function prevItemHTML(selectionStart: vscode.Position, selectionEnd: vsco
|
||||
|
||||
}
|
||||
|
||||
if (!prevNode) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let attrSelection = getPrevAttribute(selectionStart, selectionEnd, editor.document, prevNode);
|
||||
return attrSelection ? attrSelection : getSelectionFromNode(prevNode, editor.document);
|
||||
}
|
||||
|
||||
function getSelectionFromNode(node: HtmlNode, document: vscode.TextDocument): vscode.Selection {
|
||||
function getSelectionFromNode(node: HtmlNode, document: vscode.TextDocument): vscode.Selection | undefined {
|
||||
if (node && node.open) {
|
||||
let selectionStart = (<vscode.Position>node.open.start).translate(0, 1);
|
||||
let selectionEnd = selectionStart.translate(0, node.name.length);
|
||||
|
||||
return new vscode.Selection(selectionStart, selectionEnd);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function getNextAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: HtmlNode): vscode.Selection {
|
||||
function getNextAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: HtmlNode): vscode.Selection | undefined {
|
||||
|
||||
if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') {
|
||||
return;
|
||||
@@ -158,7 +163,7 @@ function getNextAttribute(selectionStart: vscode.Position, selectionEnd: vscode.
|
||||
}
|
||||
}
|
||||
|
||||
function getPrevAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: HtmlNode): vscode.Selection {
|
||||
function getPrevAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: HtmlNode): vscode.Selection | undefined {
|
||||
|
||||
if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') {
|
||||
return;
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
|
||||
import { getDeepestNode, findNextWord, findPrevWord, getNode } from './util';
|
||||
import { Node, CssNode, Rule, Property } from 'EmmetNode';
|
||||
|
||||
export function nextItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: Node): vscode.Selection {
|
||||
export function nextItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: Node): vscode.Selection | undefined {
|
||||
let currentNode = <CssNode>getNode(rootNode, endOffset, true);
|
||||
if (!currentNode) {
|
||||
currentNode = <CssNode>rootNode;
|
||||
@@ -50,7 +50,7 @@ export function nextItemStylesheet(startOffset: vscode.Position, endOffset: vsco
|
||||
|
||||
}
|
||||
|
||||
export function prevItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: CssNode): vscode.Selection {
|
||||
export function prevItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: CssNode): vscode.Selection | undefined {
|
||||
let currentNode = <CssNode>getNode(rootNode, startOffset);
|
||||
if (!currentNode) {
|
||||
currentNode = rootNode;
|
||||
@@ -88,7 +88,7 @@ export function prevItemStylesheet(startOffset: vscode.Position, endOffset: vsco
|
||||
}
|
||||
|
||||
|
||||
function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode.Selection {
|
||||
function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode.Selection | undefined {
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode
|
||||
}
|
||||
|
||||
|
||||
function getSelectionFromProperty(node: Node, document: vscode.TextDocument, selectionStart: vscode.Position, selectionEnd: vscode.Position, selectFullValue: boolean, direction: string): vscode.Selection {
|
||||
function getSelectionFromProperty(node: Node, document: vscode.TextDocument, selectionStart: vscode.Position, selectionEnd: vscode.Position, selectFullValue: boolean, direction: string): vscode.Selection | undefined {
|
||||
if (!node || node.type !== 'property') {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ import { HtmlNode } from 'EmmetNode';
|
||||
import { getNode, parseDocument, validate } from './util';
|
||||
|
||||
export function splitJoinTag() {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
if (!validate(false)) {
|
||||
if (!validate(false) || !vscode.window.activeTextEditor) {
|
||||
return;
|
||||
}
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
let rootNode = <HtmlNode>parseDocument(editor.document);
|
||||
if (!rootNode) {
|
||||
return;
|
||||
@@ -20,23 +20,19 @@ export function splitJoinTag() {
|
||||
|
||||
return editor.edit(editBuilder => {
|
||||
editor.selections.reverse().forEach(selection => {
|
||||
let textEdit = getRangesToReplace(editor.document, selection, rootNode);
|
||||
if (textEdit) {
|
||||
let nodeToUpdate = <HtmlNode>getNode(rootNode, selection.start);
|
||||
if (nodeToUpdate) {
|
||||
let textEdit = getRangesToReplace(editor.document, nodeToUpdate);
|
||||
editBuilder.replace(textEdit.range, textEdit.newText);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getRangesToReplace(document: vscode.TextDocument, selection: vscode.Selection, rootNode: HtmlNode): vscode.TextEdit {
|
||||
let nodeToUpdate = <HtmlNode>getNode(rootNode, selection.start);
|
||||
function getRangesToReplace(document: vscode.TextDocument, nodeToUpdate: HtmlNode): vscode.TextEdit {
|
||||
let rangeToReplace: vscode.Range;
|
||||
let textToReplaceWith: string;
|
||||
|
||||
if (!nodeToUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!nodeToUpdate.close) {
|
||||
// Split Tag
|
||||
let nodeText = document.getText(new vscode.Range(nodeToUpdate.start, nodeToUpdate.end));
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection, workspace } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
@@ -11,6 +12,7 @@ import { expandEmmetAbbreviation, wrapWithAbbreviation, wrapIndividualLinesWithA
|
||||
const cssContents = `
|
||||
.boo {
|
||||
margin: 20px 10px;
|
||||
m10
|
||||
background-image: url('tryme.png');
|
||||
m10
|
||||
}
|
||||
@@ -189,9 +191,9 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
|
||||
|
||||
test('Expand abbreviation (CSS)', () => {
|
||||
return withRandomFileEditor(cssContents, 'css', (editor, doc) => {
|
||||
editor.selection = new Selection(4, 1, 4, 4);
|
||||
editor.selections = [new Selection(3, 1, 3, 4), new Selection(5, 1, 5, 4)];
|
||||
return expandEmmetAbbreviation(null).then(() => {
|
||||
assert.equal(editor.document.getText(), cssContents.replace('m10', 'margin: 10px;'));
|
||||
assert.equal(editor.document.getText(), cssContents.replace(/m10/g, 'margin: 10px;'));
|
||||
return Promise.resolve();
|
||||
});
|
||||
});
|
||||
@@ -211,6 +213,29 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('Invalid locations for abbreviations in css', () => {
|
||||
const scssContentsNoExpand = `
|
||||
m10
|
||||
.boo {
|
||||
margin: 10px;
|
||||
.hoo {
|
||||
background:
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
return withRandomFileEditor(scssContentsNoExpand, 'scss', (editor, doc) => {
|
||||
editor.selections = [
|
||||
new Selection(1, 3, 1, 3), // outside rule
|
||||
new Selection(5, 15, 5, 15) // in the value part of property value
|
||||
];
|
||||
return expandEmmetAbbreviation(null).then(() => {
|
||||
assert.equal(editor.document.getText(), scssContentsNoExpand);
|
||||
return Promise.resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('Tests for Wrap with Abbreviations', () => {
|
||||
@@ -320,7 +345,7 @@ suite('Tests for Wrap with Abbreviations', () => {
|
||||
|
||||
suite('Tests for jsx, xml and xsl', () => {
|
||||
teardown(closeAllEditors);
|
||||
|
||||
|
||||
test('Expand abbreviation with className instead of class in jsx', () => {
|
||||
return withRandomFileEditor('ul.nav', 'javascriptreact', (editor, doc) => {
|
||||
editor.selection = new Selection(0, 6, 0, 6);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection, commands } from 'vscode';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
import { reflectCssValue } from '../reflectCssValue';
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user