Skip to content

Commit

Permalink
fix: missing client capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
sumimakito committed Sep 21, 2024
1 parent 5beb610 commit 467b134
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/yaml.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
type FormattingOptions,
type Hover,
type LocationLink,
MarkupKind,
type Position,
type Range,
type SelectionRange,
Expand Down Expand Up @@ -134,7 +135,20 @@ initialize<YAMLWorker, MonacoYamlOptions>((ctx, { enableSchemaRequest, ...langua
// @ts-expect-error Type definitions are wrong. This may be null.
schemaRequestService: enableSchemaRequest ? schemaRequestService : null,
telemetry,
workspaceContext
workspaceContext,
// Copied from https://github.com/microsoft/vscode-json-languageservice/blob/493010da9dc2cd1cc139d403d4709d97064b17e9/src/jsonLanguageTypes.ts#L325-L335
// Usage: https://github.com/microsoft/monaco-editor/blob/f6dc0eb8fce67e57f6036f4769d92c1666cdf546/src/language/json/jsonWorker.ts#L38
clientCapabilities: {
textDocument: {
completion: {
completionItem: {
documentationFormat: [MarkupKind.Markdown, MarkupKind.PlainText],
commitCharactersSupport: true
}
},
moniker: {}
}
}
})

const withDocument =
Expand Down

0 comments on commit 467b134

Please sign in to comment.