-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reland "fix: move extended language formatting to client" (#1261) #1263
Conversation
|
||
const SUPPORTED_EXTENSIONS_BY_LANGUAGE_ID = new Map([ | ||
["jsonc", "jsonc"], | ||
["markdown", "md"], |
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.
This was ["markdown", "markdown"]
in the first PR, causing the command to use --ext markdown
which errored.
if (status != 0) { | ||
throw new Error(`Formatting failed: ${stderr}`); | ||
} | ||
// Never empty a file. | ||
if (stdout.length == 0) { | ||
return undefined; | ||
} |
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.
The first PR didn't have this status check, only checked for spawn errors.
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.
I'm going to block this one for the time being. I don't think it's the right approach and I think we could make some adjustments to vscode-languageclient to get it to work. I'll look into this now.
Superseded by denoland/deno#28310 |
Ref #1258, #1261.