neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

highlights.scm (2098B)


      1 ; From MDeiml/tree-sitter-markdown
      2 (code_span) @markup.raw @nospell
      3 
      4 (emphasis) @markup.italic
      5 
      6 (strong_emphasis) @markup.strong
      7 
      8 (strikethrough) @markup.strikethrough
      9 
     10 (shortcut_link
     11  (link_text) @nospell)
     12 
     13 [
     14  (backslash_escape)
     15  (hard_line_break)
     16 ] @string.escape
     17 
     18 ; Conceal codeblock and text style markers
     19 ([
     20  (code_span_delimiter)
     21  (emphasis_delimiter)
     22 ] @conceal
     23  (#set! conceal ""))
     24 
     25 ; Conceal inline links
     26 (inline_link
     27  [
     28    "["
     29    "]"
     30    "("
     31    (link_destination)
     32    ")"
     33  ] @markup.link
     34  (#set! conceal ""))
     35 
     36 [
     37  (link_label)
     38  (link_text)
     39  (link_title)
     40  (image_description)
     41 ] @markup.link.label
     42 
     43 ((inline_link
     44  (link_destination) @_url) @_label
     45  (#set! @_label url @_url))
     46 
     47 ((image
     48  (link_destination) @_url) @_label
     49  (#set! @_label url @_url))
     50 
     51 ; Conceal image links
     52 (image
     53  [
     54    "!"
     55    "["
     56    "]"
     57    "("
     58    (link_destination)
     59    ")"
     60  ] @markup.link
     61  (#set! conceal ""))
     62 
     63 ; Conceal full reference links
     64 (full_reference_link
     65  [
     66    "["
     67    "]"
     68    (link_label)
     69  ] @markup.link
     70  (#set! conceal ""))
     71 
     72 ; Conceal collapsed reference links
     73 (collapsed_reference_link
     74  [
     75    "["
     76    "]"
     77  ] @markup.link
     78  (#set! conceal ""))
     79 
     80 ; Conceal shortcut links
     81 (shortcut_link
     82  [
     83    "["
     84    "]"
     85  ] @markup.link
     86  (#set! conceal ""))
     87 
     88 [
     89  (link_destination)
     90  (uri_autolink)
     91  (email_autolink)
     92 ] @markup.link.url @nospell
     93 
     94 ((uri_autolink) @_url
     95  (#offset! @_url 0 1 0 -1)
     96  (#set! @_url url @_url))
     97 
     98 (entity_reference) @nospell
     99 
    100 ; Replace common HTML entities.
    101 ((entity_reference) @character.special
    102  (#eq? @character.special " ")
    103  (#set! conceal " "))
    104 
    105 ((entity_reference) @character.special
    106  (#eq? @character.special "<")
    107  (#set! conceal "<"))
    108 
    109 ((entity_reference) @character.special
    110  (#eq? @character.special "&gt;")
    111  (#set! conceal ">"))
    112 
    113 ((entity_reference) @character.special
    114  (#eq? @character.special "&amp;")
    115  (#set! conceal "&"))
    116 
    117 ((entity_reference) @character.special
    118  (#eq? @character.special "&quot;")
    119  (#set! conceal "\""))
    120 
    121 ((entity_reference) @character.special
    122  (#any-of? @character.special "&ensp;" "&emsp;")
    123  (#set! conceal " "))