From 002084b1bea4311fdac184f080206bf890937d80 Mon Sep 17 00:00:00 2001 From: Matthias Deiml Date: Sun, 26 Jun 2022 18:02:29 +0200 Subject: feat(markdown)!: switch to split parser (#3048) * switch to split markdown parser with separate block and inline parsers to improve performance * add exclude_children! directive (useful for something like Injected markdown incorrectly highlights indented docstrings #2212) * split markdown queries into block and inline ones and add the injection for inline into block grammar * add include_dir option to parser configs (needed because the two grammars don't live in the repos root directory) BREAKING CHANGE: downstream queries need to be adapted to new parser --- lua/nvim-treesitter/parsers.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lua/nvim-treesitter/parsers.lua') diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index dc02c932..b24b6ce0 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -528,9 +528,22 @@ list.hcl = { list.markdown = { install_info = { url = "https://github.com/MDeiml/tree-sitter-markdown", + location = "tree-sitter-markdown", files = { "src/parser.c", "src/scanner.cc" }, - branch = "main", + branch = "split_parser", + }, + maintainers = { "@MDeiml" }, + experimental = true, +} + +list.markdown_inline = { + install_info = { + url = "https://github.com/MDeiml/tree-sitter-markdown", + location = "tree-sitter-markdown-inline", + files = { "src/parser.c", "src/scanner.cc" }, + branch = "split_parser", }, + maintainers = { "@MDeiml" }, experimental = true, } -- cgit v1.2.3