diff --git a/lockfile.json b/lockfile.json index 3e3f3db89..0d3748886 100644 --- a/lockfile.json +++ b/lockfile.json @@ -428,6 +428,9 @@ "po": { "revision": "d6aed225290bc71a15ab6f06305cb11419360c56" }, + "pod": { + "revision": "ea5d557cbd185cdcb5efcfdb6bc846fe909d86ae" + }, "poe_filter": { "revision": "d7b43b51f92fb19efe8af45c2246087c611c8f63" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index d1d97b983..8d12a69aa 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1281,6 +1281,15 @@ list.po = { maintainers = { "@amaanq" }, } +list.pod = { + install_info = { + url = "https://github.com/tree-sitter-perl/tree-sitter-pod", + files = { "src/parser.c", "src/scanner.c" }, + branch = "release", + }, + maintainers = { "@RabbiVeesh", "@LeoNerd" }, +} + list.poe_filter = { install_info = { url = "https://github.com/ObserverOfTime/tree-sitter-poe-filter", diff --git a/queries/pod/highlights.scm b/queries/pod/highlights.scm new file mode 100644 index 000000000..f0b65ab63 --- /dev/null +++ b/queries/pod/highlights.scm @@ -0,0 +1,72 @@ +; A highlight file for nvim-treesitter to use + +[(pod_command) + (command) + (cut_command)] @keyword + +(command_paragraph + (command) @keyword + (#lua-match? @keyword "^=head") + (content) @text.title) + +(command_paragraph + (command) @keyword + (#lua-match? @keyword "^=over") + (content) @number) + +(command_paragraph + (command) @keyword + (#lua-match? @keyword "^=item") + (content) @text) + +(command_paragraph + (command) @keyword + (#lua-match? @keyword "^=encoding") + (content) @string.special) + +(command_paragraph + (command) @keyword + (#not-lua-match? @keyword "^=(head|over|item|encoding)") + (content) @string) + +(verbatim_paragraph (content) @text.literal) + +(interior_sequence + (sequence_letter) @character + ["<" ">"] @punctuation.delimiter +) + +(interior_sequence + (sequence_letter) @character + (#eq? @character "B") + (content) @text.strong) + +(interior_sequence + (sequence_letter) @character + (#eq? @character "C") + (content) @text.literal) + +(interior_sequence + (sequence_letter) @character + (#eq? @character "F") + (content) @text.underline @string.special) + +(interior_sequence + (sequence_letter) @character + (#eq? @character "I") + (content) @text.emphasis) + +(interior_sequence + (sequence_letter) @character + (#eq? @character "L") + (content) @text.uri) + +(interior_sequence + (sequence_letter) @character + (#eq? @character "X") + (content) @text.reference) + +(interior_sequence + (sequence_letter) @character + (#eq? @character "E") + (content) @string.escape)