Add Prolog tree-sitter grammar

pull/11611/head
mkorje 3 months ago
parent 1b5295a3f3
commit d74270c937
No known key found for this signature in database

@ -159,7 +159,7 @@
| ponylang | ✓ | ✓ | ✓ | | | ponylang | ✓ | ✓ | ✓ | |
| powershell | ✓ | | | | | powershell | ✓ | | | |
| prisma | ✓ | ✓ | | `prisma-language-server` | | prisma | ✓ | ✓ | | `prisma-language-server` |
| prolog | | | | `swipl` | | prolog | | | | `swipl` |
| protobuf | ✓ | ✓ | ✓ | `bufls`, `pb` | | protobuf | ✓ | ✓ | ✓ | `bufls`, `pb` |
| prql | ✓ | | | | | prql | ✓ | | | |
| purescript | ✓ | ✓ | | `purescript-language-server` | | purescript | ✓ | ✓ | | `purescript-language-server` |

@ -1380,6 +1380,10 @@ comment-token = "%"
block-comment-tokens = { start = "/*", end = "*/" } block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "swipl" ] language-servers = [ "swipl" ]
[[grammar]]
name = "prolog"
source = { git = "https://codeberg.org/foxy/tree-sitter-prolog", subpath = "grammars/prolog", rev = "93c69d2f84d8a167c0a3f4a8d51ccefe365a4dc8" }
[[language]] [[language]]
name = "tsq" name = "tsq"
scope = "source.tsq" scope = "source.tsq"
@ -3785,4 +3789,4 @@ indent = { tab-width = 2, unit = " " }
[[grammar]] [[grammar]]
name = "thrift" name = "thrift"
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-thrift" , rev = "68fd0d80943a828d9e6f49c58a74be1e9ca142cf" } source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-thrift" , rev = "68fd0d80943a828d9e6f49c58a74be1e9ca142cf" }

@ -0,0 +1,6 @@
[
(directive_term)
(clause_term)
(arg_list)
(list_notation)
] @fold

@ -0,0 +1,46 @@
(comment) @comment @spell
(atom) @constant
((atom) @boolean
(#eq? @boolean "true"))
((atom) @boolean
(#eq? @boolean "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

@ -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)

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))
Loading…
Cancel
Save