Skip to content

Commit

Permalink
extension: run cue lsp minimally when configured to do so
Browse files Browse the repository at this point in the history
DO NOT SUBMIT

Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I6a1879a603ff2db693f045d26fe14018c01c6332
Dispatch-Trailer: {"type":"trybot","CL":1201041,"patchset":89,"ref":"refs/changes/41/1201041/89","targetBranch":"master"}
  • Loading branch information
myitcv authored and cueckoo committed Nov 29, 2024
1 parent 6443cbd commit df61619
Show file tree
Hide file tree
Showing 5 changed files with 902 additions and 43 deletions.
53 changes: 47 additions & 6 deletions extension/extension.cue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ extension: npm: {
icon: "media/white_circle_128.png"
license: "MIT"
publisher: "cuelangorg"
engines: vscode: ">=1.63.0"
engines: vscode: ">=\(devDependencies["@types/vscode"])"
categories: [
"Programming Languages",
]
activationEvents: []
activationEvents: [
"onLanguage:cue",
]
main: "./dist/main.js"
contributes: {
languages: [{
Expand All @@ -30,10 +32,49 @@ extension: npm: {
path: "./syntaxes/cue.tmLanguage.json"
embeddedLanguages: "source.cue.embedded": "source.cue"
}]
commands: [{
command: "vscode-cue.welcome"
title: "CUE: Welcome"
}]
commands: [
{
command: "vscode-cue.welcome"
title: "CUE: Welcome"
},
{
command: "vscode-cue.startlsp"
title: "CUE: Start CUE LSP"
},
{
command: "vscode-cue.stoplsp"
title: "CUE: Stop CUE LSP"
},
// TODO: see comment above reference to cmdToggleAutoRestartLSP
// reference in activate function.
// {
// command: "vscode-cue.toggleautorestart"
// title: "CUE: Toggle CUE LSP auto-restart"
// },
]

// TODO: switch to being the result of a JSON Schema "export"
configuration: {
type: "object"
title: "CUE"
properties: {
"cue.useLanguageServer": {
type: "boolean"
default: true
description: "Enable cuepls, the language server for CUE."
}
"cue.languageServerCommand": {
type: "array"
default: []
description: "The command to run to launch the language server."
}
"cue.languageServerFlags": {
type: "array"
default: []
description: "Flags like -rpc.trace and -logfile to be used while running the language server."
}
}
}
}
scripts: {
"vscode:prepublish": "cue cmd genPackageJSON && npm run clean && npm run buildpackage"
Expand Down
6 changes: 5 additions & 1 deletion extension/npm.cue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package extension
extension: npm: devDependencies: {
"@types/mocha": "10.0.7"
"@types/node": "22.9.1"
"@types/vscode": "1.63.0"
"@types/vscode": "1.85.0"
"@typescript-eslint/eslint-plugin": "7.14.1"
"@typescript-eslint/parser": "7.11.0"
"@vscode/test-cli": "0.0.9"
Expand All @@ -12,5 +12,9 @@ extension: npm: devDependencies: {
esbuild: "0.21.5"
eslint: "8.57.0"
"npm-run-all": "4.1.5"
tar: "7.4.3"
typescript: "5.4.5"
"@types/which": "3.0.4"
"vscode-languageclient": "9.0.1"
which: "5.0.0"
}
214 changes: 202 additions & 12 deletions extension/package-lock.json

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

Loading

0 comments on commit df61619

Please sign in to comment.