-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
deno 的格式化也是使用 prettier 的 使用相应的包 https://github.com/denoland/deno_std/blob/master/prettier/prettier.ts 如果没有下载的话,在第一次格式化的时候下载编译,可能会花很长时间。 所以,这里就需要确定下: 要不要自动下载且编译 prettier |
} | ||
} | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahould we register languages.registerDocumentFormattingEditProvider
and languages.registerDocumentRangeFormattingEditProvider
instead of directly formatting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. I will re-push soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
languages.registerDocumentFormattingEditProvider
is only for formatter
.
If we want to implement automatic formatting when saving.
There are 2 ways:
- listen on
workspace.onDidSaveTextDocument
and triggerformat
like this PR do above - set build-in setting
Format On Save
totrue
and setdeno
formatter to default. The bad isFormat On Save
effect all language
…into autoFmtOnSave
It's not yet for merge.
Therefore, there are still some problems in integration. waiting for this denoland/std#332 |
This reverts commit 6927e6a.
#10
What is the purpose of this pull request? (put an "X" next to item)
**What changes did you make? **