Skip to content

Commit

Permalink
fix web
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp committed May 5, 2024
1 parent 9869407 commit 0d54899
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ export function activate(context: ExtensionContext) {
initializationOptions: {
provideFsProxy: true,
enableSemanticHighlighting: workspace.getConfiguration("abaplint").get("enableSemanticHighlighting", true),
codeLens: workspace.getConfiguration("abaplint").get("codeLens"),
inlayHints: workspace.getConfiguration("abaplint").get("inlayHints"),
// when running in web mode, it fails posting these values as messages, so convert to raw JSON,
codeLens: JSON.parse(JSON.stringify(workspace.getConfiguration("abaplint").get("codeLens"))),
inlayHints: JSON.parse(JSON.stringify(workspace.getConfiguration("abaplint").get("inlayHints"))),
},
synchronize: {
fileEvents: workspace.createFileSystemWatcher("**/abaplint.json*"),
Expand Down
4 changes: 2 additions & 2 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ function initialize() {
let codeLensProvider: LServer.CodeLensOptions | undefined = {
resolveProvider: false,
};
if (params.initializationOptions.codeLens.messageTexts === false) {
if (params.initializationOptions.codeLens?.messageTexts === false) {
codeLensProvider = undefined;
}

let inlayHintProvider: LServer.InlayHintOptions | undefined = {
resolveProvider: false,
};
if (params.initializationOptions.inlayHints.inferredTypes === false) {
if (params.initializationOptions.inlayHints?.inferredTypes === false) {
inlayHintProvider = undefined;
}

Expand Down

0 comments on commit 0d54899

Please sign in to comment.