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

[Feature request] Treesitter markdown groups #294

Closed
carrascomj opened this issue Dec 16, 2021 · 0 comments
Closed

[Feature request] Treesitter markdown groups #294

carrascomj opened this issue Dec 16, 2021 · 0 comments

Comments

@carrascomj
Copy link

Related to #250, thanks to nvim-treesitter/nvim-treesitter@387a8f3

Description

Markdown tree-sitter is now available, providing different queries to match against and, most importantly, language injections for code blocks:

image

Feature request

I'd like to have this highlight when using onedark.vim and tree-sitter out of the box, since using tree-sitter deactivates the current onedark highlights on markdown (by default). For now, I have this in my tree-sitter config to achieve the above result:

require("nvim-treesitter.configs").setup({
	highlight = {
		enable = true,
		custom_captures = {
                        -- this should be Keyword but I prefer the hs in purple
			["text.title"] = "Question",
                       -- this does not work yet (problem with upstream I think)
			["text.reference"] = "Keyword",
			["text.emphasis"] = "markdownItalic",
			["text.uri"] = "markdownUrl",
		}
	},
})

Notice how the markdown tree-sitter does not provide the full spec yet.

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

1 participant