mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02:00
feat: add prolog and problog parser and queries (#6810)
This commit is contained in:
parent
e0d6c7643d
commit
6cd4ce6cab
11 changed files with 100 additions and 0 deletions
|
@ -350,6 +350,8 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [pony](https://github.com/amaanq/tree-sitter-pony) (maintained by @amaanq, @mfelsche)
|
||||
- [x] [printf](https://github.com/ObserverOfTime/tree-sitter-printf) (maintained by @ObserverOfTime)
|
||||
- [x] [prisma](https://github.com/victorhqc/tree-sitter-prisma) (maintained by @elianiva)
|
||||
- [x] [problog](https://codeberg.org/foxy/tree-sitter-prolog) (maintained by @foxyseta)
|
||||
- [x] [prolog](https://codeberg.org/foxy/tree-sitter-prolog) (maintained by @foxyseta)
|
||||
- [x] [promql](https://github.com/MichaHoffmann/tree-sitter-promql) (maintained by @MichaHoffmann)
|
||||
- [x] [properties](https://github.com/tree-sitter-grammars/tree-sitter-properties) (maintained by @ObserverOfTime)
|
||||
- [x] [proto](https://github.com/treywood/tree-sitter-proto) (maintained by @treywood)
|
||||
|
|
|
@ -530,6 +530,12 @@
|
|||
"prisma": {
|
||||
"revision": "eca2596a355b1a9952b4f80f8f9caed300a272b5"
|
||||
},
|
||||
"problog": {
|
||||
"revision": "d8bc22c007825d3af3d62b4326f9d8f9ca529974"
|
||||
},
|
||||
"prolog": {
|
||||
"revision": "d8bc22c007825d3af3d62b4326f9d8f9ca529974"
|
||||
},
|
||||
"promql": {
|
||||
"revision": "77625d78eebc3ffc44d114a07b2f348dff3061b0"
|
||||
},
|
||||
|
|
|
@ -1565,6 +1565,24 @@ list.prisma = {
|
|||
maintainers = { "@elianiva" },
|
||||
}
|
||||
|
||||
list.problog = {
|
||||
install_info = {
|
||||
url = "https://codeberg.org/foxy/tree-sitter-prolog",
|
||||
files = { "src/parser.c" },
|
||||
location = "grammars/problog",
|
||||
},
|
||||
maintainers = { "@foxyseta" },
|
||||
}
|
||||
|
||||
list.prolog = {
|
||||
install_info = {
|
||||
url = "https://codeberg.org/foxy/tree-sitter-prolog",
|
||||
files = { "src/parser.c" },
|
||||
location = "grammars/prolog",
|
||||
},
|
||||
maintainers = { "@foxyseta" },
|
||||
}
|
||||
|
||||
list.promql = {
|
||||
install_info = {
|
||||
url = "https://github.com/MichaHoffmann/tree-sitter-promql",
|
||||
|
|
1
queries/problog/folds.scm
Normal file
1
queries/problog/folds.scm
Normal file
|
@ -0,0 +1 @@
|
|||
; inherits: prolog
|
4
queries/problog/highlights.scm
Normal file
4
queries/problog/highlights.scm
Normal file
|
@ -0,0 +1,4 @@
|
|||
; inherits: prolog
|
||||
|
||||
(probability_label
|
||||
_ @attribute)
|
1
queries/problog/indents.scm
Normal file
1
queries/problog/indents.scm
Normal file
|
@ -0,0 +1 @@
|
|||
; inherits: prolog
|
1
queries/problog/injections.scm
Normal file
1
queries/problog/injections.scm
Normal file
|
@ -0,0 +1 @@
|
|||
; inherits: prolog
|
6
queries/prolog/folds.scm
Normal file
6
queries/prolog/folds.scm
Normal file
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
(directive_term)
|
||||
(clause_term)
|
||||
(arg_list)
|
||||
(list_notation)
|
||||
] @fold
|
43
queries/prolog/highlights.scm
Normal file
43
queries/prolog/highlights.scm
Normal file
|
@ -0,0 +1,43 @@
|
|||
(comment) @comment @spell
|
||||
|
||||
(atom) @constant
|
||||
|
||||
((atom) @boolean
|
||||
(#any-of? @boolean "true" "false"))
|
||||
|
||||
(functional_notation
|
||||
function: (atom) @function.call)
|
||||
|
||||
(integer) @number
|
||||
|
||||
(float_number) @number.float
|
||||
|
||||
(directive_head) @operator
|
||||
|
||||
(operator_notation
|
||||
operator: _ @operator)
|
||||
|
||||
[
|
||||
(open)
|
||||
(open_ct)
|
||||
(close)
|
||||
(open_list)
|
||||
"|"
|
||||
(close_list)
|
||||
(open_curly)
|
||||
(close_curly)
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
(arg_list_separator)
|
||||
(comma)
|
||||
(end)
|
||||
(list_notation_separator)
|
||||
] @punctuation.delimiter
|
||||
|
||||
(operator_notation
|
||||
operator: (semicolon) @punctuation.delimiter)
|
||||
|
||||
(double_quoted_list_notation) @string
|
||||
|
||||
(variable_term) @variable
|
16
queries/prolog/indents.scm
Normal file
16
queries/prolog/indents.scm
Normal file
|
@ -0,0 +1,16 @@
|
|||
(directive_term) @indent.zero
|
||||
|
||||
(clause_term) @indent.zero
|
||||
|
||||
(functional_notation
|
||||
(atom)
|
||||
(open_ct) @indent.begin
|
||||
(close) @indent.end)
|
||||
|
||||
(list_notation
|
||||
(open_list) @indent.begin
|
||||
(close_list) @indent.end)
|
||||
|
||||
(curly_bracketed_notation
|
||||
(open_curly) @indent.begin
|
||||
(close_curly) @indent.end)
|
2
queries/prolog/injections.scm
Normal file
2
queries/prolog/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
Loading…
Reference in a new issue