Crystal language support (#4993)

pull/1/head
Jonas Everaert 1 year ago committed by GitHub
parent e6a2df8c79
commit aecb524e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,6 +16,7 @@
| common-lisp | ✓ | | | `cl-lsp` |
| cpon | ✓ | | ✓ | |
| cpp | ✓ | ✓ | ✓ | `clangd` |
| crystal | ✓ | | | |
| css | ✓ | | | `vscode-css-language-server` |
| cue | ✓ | | | `cuelsp` |
| d | ✓ | ✓ | ✓ | `serve-d` |

@ -223,6 +223,18 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote
name = "cpp"
source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "d5e90fba898f320db48d81ddedd78d52c67c1fed" }
[[language]]
name = "crystal"
scope = "source.cr"
file-types = ["cr"]
roots = ["shard.yml", "shard.lock"]
comment-token = "#"
indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "crystal"
source = { git = "https://github.com/will/tree-sitter-crystal", rev = "15597b307b18028b04d288561f9c29794621562b" }
[[language]]
name = "c-sharp"
scope = "source.csharp"

@ -0,0 +1,66 @@
[
"class"
"struct"
"module"
"def"
"alias"
"do"
"end"
"require"
"include"
"extend"
] @keyword
[
"[" "]"
"(" ")"
"{" "}"
] @punctuation.bracket
(operator) @operator
(comment) @comment
; literals
(nil) @constant.builtin
(bool) @constant.builtin.boolean
(integer) @constant.numeric.integer
(float) @constant.numeric.float
[
(string)
(char)
(commandLiteral)
] @string
(symbol) @string.special.symbol
(regex) @string.special.regex
; variables
(local_variable) @variable
[
(instance_variable)
(class_variable)
] @variable.other.member
(constant) @constant
; type defintitions
(type_identifier) @constructor
; method definition/call
(identifier) @function.method
; types
(generic_type) @type
(union_type) @type
(type_identifier) @type
Loading…
Cancel
Save