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

feat(markdown): treat chartjs codeblocks as json #5994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ribru17
Copy link
Collaborator

@ribru17 ribru17 commented Jan 26, 2024

There are several Chart.js Markdown previewing plugins, and they all (or all I have seen) take JSON data passed to a chart codeblock to generate the graphs. Since the chart info string isn't recognized in any way, it would be nice to alias it to JSON to get nice injections still.

@lucario387
Copy link
Member

Can't you just vim.treesitter.language.register("json", {"chart"}) 🤔

@clason
Copy link
Contributor

clason commented Jan 27, 2024

Yes, going forward, that's the way this should be handled. (But it's Neovim 0.10 only.)

This is a general decision on when we freeze master completely. I am mostly worried about changes that conflict with rebasing main, though, and this is a change to something I've already ripped out completely.

@ribru17
Copy link
Collaborator Author

ribru17 commented Jan 27, 2024

Thank you both.

@ribru17 ribru17 closed this Jan 27, 2024
@clason
Copy link
Contributor

clason commented Jan 27, 2024

I am mostly worried about changes that conflict with rebasing main, though, and this is a change to something I've already ripped out completely.

Which means it's not something I'd want to block necessarily, if the argument for a short-term fix is strong enough.

@ribru17
Copy link
Collaborator Author

ribru17 commented Jan 27, 2024

I see. I will reopen this then, and if anyone has an argument against then they can shut it down.

@ribru17 ribru17 reopened this Jan 27, 2024
@clason
Copy link
Contributor

clason commented Jan 27, 2024

Just be aware that it'll be gone again in 1.0, so this is purely temporary. I think being forward-looking and using vim.treesitter.language.register is the better approach.

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

Successfully merging this pull request may close these issues.

None yet

3 participants