You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #9 we added the MDC formatter, but it requires the downstream Monaco Editor to utilize insertSpaces: true and detectIndentation: false.
We should update the formatter to include an additional FormatterOptions property of insertSpaces: boolean, and refactor the implementation to allow inserting space or tab character(s) \t for indentation based on the value of the insertSpaces option.
The result would then look like this when registering the document format providers:
Uh oh!
There was an error while loading. Please reload this page.
In #9 we added the MDC formatter, but it requires the downstream Monaco Editor to utilize
insertSpaces: true
anddetectIndentation: false
.We should update the formatter to include an additional
FormatterOptions
property ofinsertSpaces: boolean
, and refactor the implementation to allow inserting space or tab character(s)\t
for indentation based on the value of theinsertSpaces
option.The result would then look like this when registering the document format providers:
// formatter implementation export const formatter = (content: string, { tabSize = 2, isFormatOnType = false, + insertSpaces = true, }: FormatterOptions): string => { // ... formatter code })
The text was updated successfully, but these errors were encountered: