Skip to content

Commit

Permalink
Dummy implementation of formatting request
Browse files Browse the repository at this point in the history
  • Loading branch information
BinderDavid committed Nov 9, 2024
1 parent dd39986 commit 43c08ea
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web/packages/app/src/editor/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,24 @@ export default class Language implements monaco.languages.ILanguageExtensionPoin
return result;
},
});

monaco.languages.registerDocumentFormattingEditProvider(this.id, {
async provideDocumentFormattingEdits(model, options, token) {
void token;

const result: monaco.languages.ProviderResult<monaco.languages.TextEdit[]> = [{
range: {
startLineNumber: 1,
startColumn: 1,
endLineNumber: 1,
endColumn: 1
},
text: "",
}];

return result;
},
});
}

private static syntaxDefinition(): monaco.languages.IMonarchLanguage {
Expand Down

0 comments on commit 43c08ea

Please sign in to comment.