diff options
| author | Santos Gallegos <stsewd@protonmail.com> | 2021-04-02 11:58:45 -0500 |
|---|---|---|
| committer | Kiyan <yazdani.kiyan@protonmail.com> | 2021-04-03 10:48:09 +0200 |
| commit | 4bfccba843d4fb2da96996dd827cd03dd9e546fa (patch) | |
| tree | 04df9a76015e609b4189856a4f7b0bc7c928d325 | |
| parent | fix: prev_node nil check (diff) | |
| download | nvim-treesitter-4bfccba843d4fb2da96996dd827cd03dd9e546fa.tar nvim-treesitter-4bfccba843d4fb2da96996dd827cd03dd9e546fa.tar.gz nvim-treesitter-4bfccba843d4fb2da96996dd827cd03dd9e546fa.tar.bz2 nvim-treesitter-4bfccba843d4fb2da96996dd827cd03dd9e546fa.tar.lz nvim-treesitter-4bfccba843d4fb2da96996dd827cd03dd9e546fa.tar.xz nvim-treesitter-4bfccba843d4fb2da96996dd827cd03dd9e546fa.tar.zst nvim-treesitter-4bfccba843d4fb2da96996dd827cd03dd9e546fa.zip | |
Comment: highlight text nodes
As requested in https://github.com/nvim-treesitter/nvim-treesitter/issues/236#issuecomment-797878646
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | queries/comment/highlights.scm | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lockfile.json b/lockfile.json index 025b39dff..64c741620 100644 --- a/lockfile.json +++ b/lockfile.json @@ -18,7 +18,7 @@ "revision": "95c7959c461406381b42113dcf4591008c663d21" }, "comment": { - "revision": "4a47080791683ce1bdfba85255df4d512edbb5d5" + "revision": "814bf323edb504caee2331872b854c9f19eb5d2b" }, "cpp": { "revision": "c61212414a3e95b5f7507f98e83de1d638044adc" diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm index 3a8e1d49d..88ae027db 100644 --- a/queries/comment/highlights.scm +++ b/queries/comment/highlights.scm @@ -10,9 +10,15 @@ ((tag ((name) @text.warning)) (#match? @text.warning "^(TODO|HACK|WARNING)$")) +("text" @text.warning + (#match? @text.warning "^(TODO|HACK|WARNING)$")) + ((tag ((name) @text.danger)) (#match? @text.danger "^(FIXME|XXX|BUG)$")) +("text" @text.danger + (#match? @text.danger "^(FIXME|XXX|BUG)$")) + ; Issue number (#123) ("text" @number (#match? @number "^#[0-9]+$")) ; User mention (@user) |
