From f7d92f663c07b9be35ceea0342c215ca396c48fb Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Thu, 1 Oct 2020 21:38:38 +0200 Subject: feat(languagetree): implement language tree Allow the LanguageTree to be used as an option for highlighting. Co-authored-by: Santos Gallegos Co-authored-by: Yazdani Kiyan --- queries/markdown/highlights.scm | 19 +++++++++++++++++++ queries/markdown/injections.scm | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 queries/markdown/highlights.scm create mode 100644 queries/markdown/injections.scm (limited to 'queries/markdown') diff --git a/queries/markdown/highlights.scm b/queries/markdown/highlights.scm new file mode 100644 index 00000000..101526bf --- /dev/null +++ b/queries/markdown/highlights.scm @@ -0,0 +1,19 @@ +(atx_heading) @text.title + +[ + (code_span) + (fenced_code_block) +]@text.literal + +(code_fence_content) @none + +[ + (link_text) + (image_description) +] @text.strong + +[ + (emphasis) + (strong_emphasis) +] @text.emphasis +(link_destination) @text.uri diff --git a/queries/markdown/injections.scm b/queries/markdown/injections.scm new file mode 100644 index 00000000..0522dee2 --- /dev/null +++ b/queries/markdown/injections.scm @@ -0,0 +1,6 @@ +(fenced_code_block + (info_string) @lang + (code_fence_content) @injection) + +((html_block) @injection + (#set! "lang" "html")) -- cgit v1.2.3