support for openscad (#2680)

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
pull/2685/head
farwyler 2 years ago committed by GitHub
parent 26dbdb70fb
commit f0d1c85553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,6 +63,7 @@
| ocaml | ✓ | | ✓ | `ocamllsp` | | ocaml | ✓ | | ✓ | `ocamllsp` |
| ocaml-interface | ✓ | | | `ocamllsp` | | ocaml-interface | ✓ | | | `ocamllsp` |
| odin | ✓ | | | | | odin | ✓ | | | |
| openscad | ✓ | | | `openscad-language-server` |
| org | ✓ | | | | | org | ✓ | | | |
| perl | ✓ | ✓ | ✓ | | | perl | ✓ | ✓ | ✓ | |
| php | ✓ | ✓ | ✓ | `intelephense` | | php | ✓ | ✓ | ✓ | `intelephense` |

@ -1433,3 +1433,18 @@ indent = { tab-width = 2, unit = " " }
[[grammar]] [[grammar]]
name = "jsdoc" name = "jsdoc"
source = { git = "https://github.com/tree-sitter/tree-sitter-jsdoc", rev = "189a6a4829beb9cdbe837260653b4a3dfb0cc3db" } source = { git = "https://github.com/tree-sitter/tree-sitter-jsdoc", rev = "189a6a4829beb9cdbe837260653b4a3dfb0cc3db" }
[[language]]
name = "openscad"
scope = "source.openscad"
injection-regex = "openscad"
file-types = ["scad"]
roots = []
comment-token = "//"
language-server = { command = "openscad-language-server" }
indent = { tab-width = 2, unit = "\t" }
[[grammar]]
name = "openscad"
source = { git = "https://github.com/bollian/tree-sitter-openscad", rev = "5c3ce93df0ac1da7197cf6ae125aade26d6b8972" }

@ -0,0 +1,63 @@
(number) @constant.numeric
(string) @string
(boolean) @constant.builtin.boolean
(include_path) @string.special.path
(parameters_declaration (identifier) @variable.parameter)
(function_declaration name: (identifier) @function)
(function_call function: (identifier) @function)
(module_call name: (identifier) @function)
(identifier) @variable
(special_variable) @variable.builtin
[
"function"
"let"
"assign"
] @keyword
[
"for"
"each"
"intersection_for"
] @keyword.control.repeat
[
"if"
] @keyword.control.conditional
[
"module"
"use"
"include"
] @keyword.control.import
[
"||"
"&&"
"=="
"!="
"<"
">"
"<="
">="
"+"
"-"
"*"
"/"
"%"
"^"
"?"
"!"
":"
] @operator
[
";"
","
"."
] @punctuation.delimiter
(comment) @comment
Loading…
Cancel
Save