Files
carbon-lang/utils/vscode/package.json
T
Jon Ross-PerkinsandRichard Smith f922988c8c Update the vscode language server setup (#4663)
Switches from js to ts, and starts bundling files in order to produce a
better package for deployment. Fixes the README.md to be a more
appropriate front page, moving dev content to development.md. Makes the
path to `carbon` configurable so that it's more stable than just running
in `bazel-bin`.

This is built using suggestions from samples at
https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample
and
https://github.com/microsoft/vscode-extension-samples/tree/main/esbuild-sample.
Note the esbuild in particular comes from complaints from `vsce` to use
an option from
https://code.visualstudio.com/api/working-with-extensions/bundling-extension,
and esbuild is just the first option detailed there (I have no real
opinion on options).

I'm bumping the version, and will do a release after merging.

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2024-12-16 16:05:17 +00:00

76 lines
1.9 KiB
JSON

{
"name": "carbon-vscode",
"displayName": "Carbon Language",
"version": "0.0.3",
"publisher": "carbon-lang",
"description": "Carbon language support for Visual Studio Code.",
"repository": {
"url": "https://github.com/carbon-language/carbon-lang"
},
"engines": {
"vscode": "^1.90.0"
},
"categories": [
"Programming Languages"
],
"icon": "images/icon.png",
"activationEvents": [],
"main": "./dist/extension.js",
"contributes": {
"languages": [
{
"id": "carbon",
"aliases": [
"Carbon"
],
"extensions": [
".carbon"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "carbon",
"scopeName": "source.carbon",
"path": "./carbon.tmLanguage.json"
}
],
"configuration": {
"type": "object",
"title": "Carbon Language",
"properties": {
"carbon.carbonPath": {
"type": "string",
"description": "The path to the 'carbon' binary."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "npm run check-types && npm run lint && node esbuild.js",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "npm run check-types && npm run lint && node esbuild.js --production",
"compile-tests": "tsc -p . --outDir out",
"check-types": "tsc --noEmit",
"lint": "eslint"
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@stylistic/eslint-plugin": "^2.9.0",
"@types/node": "^20",
"@types/vscode": "^1.73.0",
"@vscode/vsce": "^2.27.0",
"esbuild": "^0.24.0",
"eslint": "^9.13.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
}
}