on master help sign in
Add GNU gettext PO grammar (#5996)
864ee8fErasin
book/src/generated/lang-support.md+1
@@ -98,6 +98,7 @@
98| pem | ✓ | | | |
98| pem | ✓ | | | |
99| perl | ✓ | ✓ | ✓ | |
99| perl | ✓ | ✓ | ✓ | |
100| php | ✓ | ✓ | ✓ | `intelephense` |
100| php | ✓ | ✓ | ✓ | `intelephense` |
101+| po | ✓ | ✓ | | |
101| ponylang | ✓ | ✓ | ✓ | |
102| ponylang | ✓ | ✓ | ✓ | |
102| prisma | ✓ | | | `prisma-language-server` |
103| prisma | ✓ | | | `prisma-language-server` |
103| prolog | | | | `swipl` |
104| prolog | | | | `swipl` |
languages.toml+11
@@ -2193,3 +2193,14 @@ indent = { tab-width = 2, unit = " " }
2193[[grammar]]
2193[[grammar]]
2194name = "yuck"
2194name = "yuck"
2195source = { git = "https://github.com/Philipp-M/tree-sitter-yuck", rev = "9e97da5773f82123a8c8cccf8f7e795d140ed7d1" }
2195source = { git = "https://github.com/Philipp-M/tree-sitter-yuck", rev = "9e97da5773f82123a8c8cccf8f7e795d140ed7d1" }
2196+
2197+[[language]]
2198+name = "po"
2199+scope = "source.po"
2200+file-types = ["po", "pot"]
2201+roots = []
2202+comment-token = "#"
2203+
2204+[[grammar]]
2205+name = "po"
2206+source = { git = "https://github.com/erasin/tree-sitter-po", rev = "417cee9abb2053ed26b19e7de972398f2da9b29e" }
runtime/queries/po/highlights.scmnew file+15
@@ -0,0 +1,15 @@
1+[
2+ (msgctxt)
3+ (msgid)
4+ (msgid_plural)
5+ (msgstr)
6+]@keyword
7+
8+(comment) @comment
9+(comment (comment_reference (text) @string.special.path))
10+(comment (comment_flag (text) @label))
11+
12+(number) @constant.numeric
13+(string) @string
14+
15+(ERROR) @error
runtime/queries/po/textobjects.scmnew file+6
@@ -0,0 +1,6 @@
1+(msgid) @parameter.inside
2+
3+(comment) @comment.inside
4+(comment)+ @comment.around
5+
6+