Skip to content

Commit

Permalink
Implement semantic coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
nguerrera committed Jun 10, 2022
1 parent 73c8bf7 commit 8d90b39
Show file tree
Hide file tree
Showing 26 changed files with 1,084 additions and 809 deletions.
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"label": "watch-tmlanguage",
"type": "process",
"command": "node",
"args": ["${workspaceFolder}/packages/cadl-vscode/scripts/watch-tmlanguage.js"],
"args": ["${workspaceFolder}/packages/compiler/scripts/watch-tmlanguage.js"],
"problemMatcher": {
"base": "$msCompile",
"background": {
Expand All @@ -47,7 +47,7 @@
},
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/packages/cadl-vscode"
"cwd": "${workspaceFolder}/packages/compiler"
},
"presentation": {
"echo": true,
Expand Down
8 changes: 5 additions & 3 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 16 additions & 10 deletions packages/cadl-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,31 @@
"title": "Restart Cadl server",
"category": "Cadl"
}
],
"semanticTokenScopes": [
{
"scopes": {
"keyword": [
"keyword.other.cadl"
],
"macro": [
"entity.name.tag.cadl"
]
}
}
]
},
"scripts": {
"clean": "rimraf ./dist ./dist-dev ./temp",
"build": "npm run compile && npm run rollup && npm run generate-tmlanguage && npm run generate-language-configuration && npm run generate-third-party-notices && npm run package-vsix",
"build": "npm run compile && npm run rollup && npm run copy-tmlanguage && npm run generate-language-configuration && npm run generate-third-party-notices && npm run package-vsix",
"compile": "tsc -p .",
"watch": "tsc -p . --watch",
"watch-tmlanguage": "node scripts/watch-tmlanguage.js",
"dogfood": "node scripts/dogfood.js",
"generate-tmlanguage": "node scripts/generate-tmlanguage.js",
"copy-tmlanguage": "node scripts/copy-tmlanguage.js",
"generate-language-configuration": "node scripts/generate-language-configuration.js",
"generate-third-party-notices": "cadl-build-tool generate-third-party-notices",
"rollup": "rollup --config --failAfterWarnings 2>&1",
"package-vsix": "vsce package --yarn",
"test": "mocha",
"test-official": "mocha --forbid-only"
"package-vsix": "vsce package --yarn"
},
"dependencies": {},
"devDependencies": {
Expand All @@ -121,11 +130,8 @@
"mocha": "~9.2.0",
"rimraf": "~3.0.2",
"rollup": "~2.70.1",
"tmlanguage-generator": "~0.3.0",
"typescript": "~4.7.2",
"vsce": "~2.6.7",
"vscode-languageclient": "~8.0.0",
"vscode-oniguruma": "~1.6.1",
"vscode-textmate": "~6.0.0"
"vscode-languageclient": "~8.0.0"
}
}
6 changes: 6 additions & 0 deletions packages/cadl-vscode/scripts/copy-tmlanguage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { copyFile } from "fs/promises";

await copyFile(
"node_modules/@cadl-lang/compiler/dist/cadl.tmLanguage",
"../cadl-vscode/dist/cadl.tmLanguage"
);
12 changes: 0 additions & 12 deletions packages/cadl-vscode/scripts/generate-tmlanguage.js

This file was deleted.

26 changes: 0 additions & 26 deletions packages/cadl-vscode/test/alias.test.ts

This file was deleted.

28 changes: 0 additions & 28 deletions packages/cadl-vscode/test/decorator.test.ts

This file was deleted.

109 changes: 0 additions & 109 deletions packages/cadl-vscode/test/interface.test.ts

This file was deleted.

Loading

0 comments on commit 8d90b39

Please sign in to comment.