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

YAML/TOML metadata highlight support? #3

Open
shaohme opened this issue Sep 7, 2024 · 2 comments
Open

YAML/TOML metadata highlight support? #3

shaohme opened this issue Sep 7, 2024 · 2 comments

Comments

@shaohme
Copy link

shaohme commented Sep 7, 2024

Hey,

I have stumbled upon your project, and have got it working on my Emacs by adding grammar support. Emacs seems to render most fine, except YAML/TOML metadata on op of a markdown file, like when writing markdown files for Hugo.

According to upstream tree-sitter-markdown those extensions should be supported and enabled by default. Does this major-mode need more work to have metadata highlighted?

@LionyxML
Copy link
Owner

Hello there @shaohme !

Thanks to reach out!

There's actually a bit of work to be done so more stuff the parser provides can actually be interpreted by Emacs.

Could you provide me with some examples of such metadata within the markdown? I could probably work from there :)

@shaohme
Copy link
Author

shaohme commented Sep 14, 2024

I sure can. Here is an example from Hugo with TOML metadata.

+++
title = 'My First Post'
date = 2024-01-14T07:07:07+01:00
draft = true
+++
## Introduction

This is **bold** text, and this is *emphasized* text.

Visit the [Hugo](https://gohugo.io) website!

Here is an example of YAML metadata, also known as "Front matter":

---
title: "My First Post"
date: "2024-01-14T07:07:07+01:00"
draft: true
---
## Introduction

This is **bold** text, and this is *emphasized* text.

Visit the [Hugo](https://gohugo.io) website!

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

No branches or pull requests

2 participants