mirror of https://github.com/helix-editor/helix
Add Prolog tree-sitter grammar (#11611)
parent
d0c5a2044d
commit
1fc19c6d8e
|
@ -175,7 +175,7 @@
|
|||
| ponylang | ✓ | ✓ | ✓ | |
|
||||
| powershell | ✓ | | | |
|
||||
| prisma | ✓ | ✓ | | `prisma-language-server` |
|
||||
| prolog | | | | `swipl` |
|
||||
| prolog | ✓ | | ✓ | `swipl` |
|
||||
| protobuf | ✓ | ✓ | ✓ | `buf`, `pb`, `protols` |
|
||||
| prql | ✓ | | | |
|
||||
| purescript | ✓ | ✓ | | `purescript-language-server` |
|
||||
|
|
|
@ -1501,6 +1501,10 @@ comment-token = "%"
|
|||
block-comment-tokens = { start = "/*", end = "*/" }
|
||||
language-servers = [ "swipl" ]
|
||||
|
||||
[[grammar]]
|
||||
name = "prolog"
|
||||
source = { git = "https://codeberg.org/foxy/tree-sitter-prolog", subpath = "grammars/prolog", rev = "d8d415f6a1cf80ca138524bcc395810b176d40fa" }
|
||||
|
||||
[[language]]
|
||||
name = "tsq"
|
||||
scope = "source.tsq"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
(directive_term)
|
||||
(clause_term)
|
||||
(arg_list)
|
||||
(list_notation)
|
||||
] @fold
|
|
@ -0,0 +1,43 @@
|
|||
(comment) @comment
|
||||
|
||||
(atom) @constant
|
||||
|
||||
((atom) @constant.builtin.boolean
|
||||
(#any-of? @constant.builtin.boolean "true" "false"))
|
||||
|
||||
(functional_notation
|
||||
function: (atom) @function)
|
||||
|
||||
(integer) @constant.numeric.integer
|
||||
|
||||
(float_number) @constant.numeric.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,12 @@
|
|||
(functional_notation
|
||||
(atom)
|
||||
(open_ct) @indent
|
||||
(close) @outdent)
|
||||
|
||||
(list_notation
|
||||
(open_list) @indent
|
||||
(close_list) @outdent)
|
||||
|
||||
(curly_bracketed_notation
|
||||
(open_curly) @indent
|
||||
(close_curly) @outdent)
|
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
Loading…
Reference in New Issue