Skip to content
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

Support embedded languages #287

Open
4 tasks done
remcohaszing opened this issue Jan 26, 2023 · 1 comment
Open
4 tasks done

Support embedded languages #287

remcohaszing opened this issue Jan 26, 2023 · 1 comment

Comments

@remcohaszing
Copy link
Member

Initial checklist

Problem

It would be nice if we can provide editor features for embedded languages, this includes code blocks and frontmatter.

Solution

The Embedded Programming Languages guide offers some help.

I suggest to use the Request Forwarding method, because this means we support any languages the user has installed. This seems to be bound to Visual Studio Code though, not the language server.

Alternatives

  1. Use the Language Service method, but that means we need to include every language server we want to support, and write a lot of custom logic.
  2. Since Visual Studio Code doesn’t support this in markdown files, we could also make this an external extension that can handle both MDX and markdown based on remark.
@remcohaszing
Copy link
Member Author

I think it’s good to see this into two distinct features:

  1. Frontmatter: Has relatively predictable content.
  2. Code blocks can hold any arbritrary language.

Supporting YAML frontmatter is relatively straight-forward and can be handled using an embedded language, especially now that we use Volar.

For TOML frontmatter and code blocks, we should use request forwarding. This should probably be upstreamed to Volar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant