-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Linting inside Markdown blocks outside of .md files #25
Comments
Does VS Code recognize that section as Markdown? That’s the first step. |
How be happy to check that for you — how does VSCode determine that, and how would I verify? |
Open the file in Code and see if you get Markdown intellisense in that block. Maybe also check if the language chooser in the lower right changes. More info: https://code.visualstudio.com/docs/editor/intellisense |
As far as I can tell, it doesn’t seem to be picking it up. |
Bummer. That’s definitely how I’d want to go about this. I’ll leave the issue open, but please don’t hold your breath. :) |
Is that something that would have to be added upstream in VSCode itself in order to hook into it? |
That would be ideal, yes. If that support were present (and it might be, I just didn’t see it from my phone) then an extension could easily find out which parts of a document it can understand and could then process them. Without support like that, each extension needs to understand every relevant file type, parse it, and find the relevant sections. It’s possible, but it’s a lot more work and it doesn’t scale as well. |
I think this plugin does something similar: provides HTML intellisense inside of JS files. https://github.com/Microsoft/typescript-lit-html-plugin |
That extension seems to be implemented as a language service (a different thing) and uses a package by Microsoft specifically to enable template strings in TypeScript: https://github.com/Microsoft/typescript-template-language-service-decorator I've looked a bit more and not found anything that looks like it does what I want. Also, the presence of |
Here's a grammar injection approach https://github.com/mjbvz/vscode-comment-tagged-templates. |
Is it possible to get linting inside of Markdown-like blocks inside of non-Markdown files? The use case here is in Elixir documentation, which is formatted in Markdown, but it’s actually just a block inside of a
.ex
or.exs
file.From the above link, an example:
What’s between the
"""
of@moduledoc
and@doc
(and also, though not shown,@typedoc
) is formatted with Markdown. Getting the warnings and/or, if possible, the auto-formatting inside of those blocks would be tremendous!The text was updated successfully, but these errors were encountered: