-
Notifications
You must be signed in to change notification settings - Fork 143
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
Some people may not expect this extension formatting Markdown files outside of Deno projects #555
Comments
We need to think about this as this would be a significant change in behaviour, as quite a few people use Deno as a formatter across the board, and if you have chosen Deno as your default formatter, I would expect people would want that, though I can see some people being surprised at the range of file types (like markdown) that Deno handles. Potentially a compromise that I would see as viable is we would add |
@kitsonk Vote up
|
Hi all, I've really enjoyed working with Deno, when I can. However, as a very-heavy user of Markdown, I need to be able to author Markdown documents using the (edit: Markdown) extensions of my choice. The following diff illustrates some formatting changes made on save that mean, sadly, that I cannot enable this (edit: Deno) extension. ## Tables
-| Syntax | Description |
+| Syntax | Description |
| --------: | :---------: |
-| Header | Title |
-| Paragraph | Text |
+| Header | Title |
+| Paragraph | Text |
# Heading B {#heading-b}
@@ -20,9 +20,7 @@ https://www.markdownguide.org/extended-syntax/.
Here's a simple footnote,[^2] and here's a longer one.[^1]
-[^1]: This is the first footnote.
-[^2]:
- The first paragraph of the definition.
+[^1]: This is the first footnote. [^2]: The first paragraph of the definition.
Paragraph two of the definition.
@@ -45,12 +43,10 @@ Here's a simple footnote,[^2] and here's a longer one.[^1]
## Lists
-First Term
-: This is the definition of the first term.
+First Term : This is the definition of the first term.
-Second Term
-: This is one definition of the second term.
-: This is another definition of the second term.
+Second Term : This is one definition of the second term. : This is another
+definition of the second term.
- [x] Write the press release
- [ ] Update the website Nonetheless, thanks for all of the hard work. |
I was also extremely surprised to find that Deno extension was formatting my markdown files in a non-Deno project |
I was very surprised that despite having explicitly in my config:
That Deno thought it was OK to reformat every single MD file. I even find strange thinking that Deno defaults to be universal MD formatter of my computer |
You have to specify the formatter per-language: {
"[typescript]": { "editor.defaultFormatter": "denoland.vscode-deno" },
"[javascript]": { "editor.defaultFormatter": "denoland.vscode-deno" },
} Or disable it for markdown: "editor.defaultFormatter": "denoland.vscode-deno"
"[markdown]": { "editor.defaultFormatter": null }, This has to be done independently of |
Hello.
This extension formats my Markdown texts, even if I put
{ "deno.enable": false }
in my workspace's.vscode/settings.json
.I think it would be better not to let it do that when the file is not in a Deno project, or at least provide an option to disable this behavior.
A little bit earlier, I noticed that my Markdown files started to be formatted automatically on saving. Although I found it a little annoying, I just left it as is. Until today, I found It corrupts Markdown tables inside lists when there are no leading empty lines1:
It took me some time to figure out that the Markdown formatter is from this extension, who would have thought?
So, I think it might make sense to make this extension, by default, format Markdown files only if it is inside a Deno project (i.e.
"deno.enable": true
in.vscode/settings.json
).To Reproduce
Expected behavior
It does not do anything.
Versions
vscode: 1.60.2 deno: 1.14.2 extension: v3.9.1
Footnotes
According to this line of comment, It seems the bug is from dprint-plugin-markdown and furtherly from pulldown-cmark, so I opened an issue there. ↩
The text was updated successfully, but these errors were encountered: