mirror of
https://codeberg.org/ProgramSnail/tree-sitter-lang.git
synced 2025-12-05 22:28:43 +00:00
config file fixes, langexp -> lang, highlighting
This commit is contained in:
parent
1357783074
commit
154fbfb4d4
5 changed files with 113 additions and 6 deletions
10
Cargo.toml
10
Cargo.toml
|
|
@ -1,11 +1,11 @@
|
|||
[package]
|
||||
name = "tree-sitter-YOUR-LANGUAGE-NAME"
|
||||
description = "YOUR-LANGUAGE-NAME grammar for the tree-sitter parsing library"
|
||||
name = "tree-sitter-lang"
|
||||
description = "lang grammar for the tree-sitter parsing library"
|
||||
version = "0.0.1"
|
||||
keywords = ["incremental", "parsing", "YOUR-LANGUAGE-NAME"]
|
||||
keywords = ["incremental", "parsing", "lang"]
|
||||
categories = ["parsing", "text-editors"]
|
||||
repository = "https://github.com/tree-sitter/tree-sitter-YOUR-LANGUAGE-NAME"
|
||||
edition = "2018"
|
||||
repository = "https://codeberg.org/programsnail/tree-sitter-lang"
|
||||
edition = "2023"
|
||||
license = "MIT"
|
||||
|
||||
build = "bindings/rust/build.rs"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"targets": [
|
||||
{
|
||||
"target_name": "tree_sitter_YOUR_LANGUAGE_NAME_binding",
|
||||
"target_name": "tree_sitter_lang_binding",
|
||||
"include_dirs": [
|
||||
"<!(node -e \"require('nan')\")",
|
||||
"src"
|
||||
|
|
|
|||
107
queries/highlights.scm
Normal file
107
queries/highlights.scm
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
[
|
||||
"let"
|
||||
"%"
|
||||
"var"
|
||||
"$"
|
||||
] @keyword.storage.type
|
||||
|
||||
[
|
||||
"in"
|
||||
"<-"
|
||||
"ref"
|
||||
"<>"
|
||||
"const"
|
||||
"--"
|
||||
"out"
|
||||
"->"
|
||||
] @keyword.storage.modifier
|
||||
|
||||
[
|
||||
"for"
|
||||
"@"
|
||||
] @keyword.control.repeat
|
||||
|
||||
[
|
||||
"if"
|
||||
"??"
|
||||
"elif"
|
||||
"!!"
|
||||
"else"
|
||||
"!!=>"
|
||||
] @keyword.control.conditional
|
||||
|
||||
[
|
||||
"break"
|
||||
"continue"
|
||||
"return"
|
||||
"bring"
|
||||
] @keyword.control.return
|
||||
|
||||
[
|
||||
"do"
|
||||
"=>"
|
||||
":="
|
||||
"=:"
|
||||
] @keyword.control
|
||||
|
||||
[
|
||||
"import"
|
||||
"::"
|
||||
] @keyword.control.import
|
||||
|
||||
[
|
||||
"->"
|
||||
"<-"
|
||||
"="
|
||||
"|"
|
||||
"&"
|
||||
":"
|
||||
"!"
|
||||
"?"
|
||||
] @punctuation
|
||||
|
||||
[
|
||||
";"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
(definition_info) @comment.block.documentation
|
||||
(annotation_info) @comment.block.documentation
|
||||
|
||||
(extra) @comment.block
|
||||
|
||||
(placeholder) @variable.language
|
||||
(simple_name_identifier) @variable
|
||||
(simple_type_identifier) @type
|
||||
(typeclass_identifier) @tag ; for better highlighting
|
||||
(argument_name_identifier) @variable.parameter
|
||||
(argument_type_identifier) @type.builtin ; for better highlighting
|
||||
(annotation_identifier) @attribute
|
||||
|
||||
"\\" @type ; for better highlighting
|
||||
|
||||
(operator) @keyword.operator
|
||||
(operator_tail1) @keyword.operator
|
||||
(operator_tail2) @keyword.operator
|
||||
(operator_tail3) @keyword.operator
|
||||
|
||||
(float_literal) @constant.numeric.float
|
||||
(double_literal) @constant.numeric.float
|
||||
(int_literal) @constant.numeric.integer
|
||||
(long_literal) @constant.numeric.integer
|
||||
(index_literal) @constant.numeric.integer
|
||||
(string_literal) @string
|
||||
(unicode_string_literal) @string
|
||||
(char_literal) @constant.char
|
||||
(unicode_literal) @constant.char
|
||||
(bool_literal) @constant.language
|
||||
(unit_literal) @constant.language
|
||||
(null_literal) @constant.language
|
||||
Loading…
Add table
Add a link
Reference in a new issue