diff --git a/actions-languageserver/README.md b/actions-languageserver/README.md index f365b64..9c0cbf3 100644 --- a/actions-languageserver/README.md +++ b/actions-languageserver/README.md @@ -16,9 +16,9 @@ npm install @actions/languageserver For the server, import the module. It detects whether it's running in a Node.js environment or a web worker and initializes the appropriate connection. -`server.js`: +`server.ts`: -```js +```typescript import "@actions/languageserver"; ``` @@ -26,7 +26,7 @@ For the client, create a new `LanguageClient` pointing to the server module. `client.ts`: -```js +```typescript import {LanguageClient, ServerOptions, TransportKind} from "vscode-languageclient/node"; const debugOptions = {execArgv: ["--nolazy", "--inspect=6010"]}; @@ -34,8 +34,7 @@ const debugOptions = {execArgv: ["--nolazy", "--inspect=6010"]}; const clientOptions: LanguageClientOptions = { documentSelector: [{ pattern: "**/.github/workflows/*.{yaml,yml}" - }], - progressOnInitialization: true + }] }; const serverModule = context.asAbsolutePath(path.join("dist", "server.js")); @@ -87,8 +86,7 @@ const clientOptions: LanguageClientOptions = { documentSelector: [{ pattern: "**/.github/workflows/*.{yaml,yml}" }], - initializationOptions: initializationOptions, - progressOnInitialization: true + initializationOptions: initializationOptions }; const client = new LanguageClient("actions-language", "GitHub Actions Language Server", serverOptions, clientOptions); diff --git a/actions-languageservice/README.md b/actions-languageservice/README.md index c51bfbe..f853365 100644 --- a/actions-languageservice/README.md +++ b/actions-languageservice/README.md @@ -34,7 +34,7 @@ TODO Validate a workflow file, returns an array of [`Diagnostic`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic) objects. -```js +```typescript const config: ValidationConfig = { valueProviderConfig: valueProviders(sessionToken, repoContext, cache), contextProviderConfig: contextProviders(sessionToken, repoContext, cache), @@ -47,7 +47,7 @@ const result = await validate(textDocument, config); // result is an array of `D Get information when [hovering](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_hover) over a token in the workflow file. -```js +```typescript import {hover} from "@actions/languageservice"; const document = {