mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 16:00:02 -04:00
feat: add smithy (#4245)
This commit is contained in:
parent
f6531e27fd
commit
e00952111e
4 changed files with 126 additions and 0 deletions
|
|
@ -295,6 +295,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [scss](https://github.com/serenadeai/tree-sitter-scss) (maintained by @elianiva)
|
- [x] [scss](https://github.com/serenadeai/tree-sitter-scss) (maintained by @elianiva)
|
||||||
- [x] [slint](https://github.com/jrmoulton/tree-sitter-slint) (experimental, maintained by @jrmoulton)
|
- [x] [slint](https://github.com/jrmoulton/tree-sitter-slint) (experimental, maintained by @jrmoulton)
|
||||||
- [x] [smali](https://github.com/amaanq/tree-sitter-smali) (experimental, maintained by @amaanq)
|
- [x] [smali](https://github.com/amaanq/tree-sitter-smali) (experimental, maintained by @amaanq)
|
||||||
|
- [x] [smithy](https://github.com/indoorvivants/tree-sitter-smithy) (maintained by @amaanq, @keynmol)
|
||||||
- [x] [solidity](https://github.com/YongJieYongJie/tree-sitter-solidity) (maintained by @YongJieYongJie)
|
- [x] [solidity](https://github.com/YongJieYongJie/tree-sitter-solidity) (maintained by @YongJieYongJie)
|
||||||
- [x] [sparql](https://github.com/BonaBeavis/tree-sitter-sparql) (maintained by @BonaBeavis)
|
- [x] [sparql](https://github.com/BonaBeavis/tree-sitter-sparql) (maintained by @BonaBeavis)
|
||||||
- [x] [sql](https://github.com/derekstride/tree-sitter-sql) (maintained by @derekstride)
|
- [x] [sql](https://github.com/derekstride/tree-sitter-sql) (maintained by @derekstride)
|
||||||
|
|
|
||||||
|
|
@ -368,6 +368,9 @@
|
||||||
"smali": {
|
"smali": {
|
||||||
"revision": "d7f535e176c928d33b0e202dd808ac247cacf2ff"
|
"revision": "d7f535e176c928d33b0e202dd808ac247cacf2ff"
|
||||||
},
|
},
|
||||||
|
"smithy": {
|
||||||
|
"revision": "8516587df08b923e3bc6e6108b94abbafe7765c7"
|
||||||
|
},
|
||||||
"solidity": {
|
"solidity": {
|
||||||
"revision": "52ed0880c0126df2f2c7693f215fe6f38e4a2e0a"
|
"revision": "52ed0880c0126df2f2c7693f215fe6f38e4a2e0a"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -639,6 +639,14 @@ list.smali = {
|
||||||
experimental = true,
|
experimental = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.smithy = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/indoorvivants/tree-sitter-smithy",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@amaanq", "@keynmol" },
|
||||||
|
}
|
||||||
|
|
||||||
list.haskell = {
|
list.haskell = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/tree-sitter/tree-sitter-haskell",
|
url = "https://github.com/tree-sitter/tree-sitter-haskell",
|
||||||
|
|
|
||||||
114
queries/smithy/highlights.scm
Normal file
114
queries/smithy/highlights.scm
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
; Preproc
|
||||||
|
|
||||||
|
(control_key) @preproc
|
||||||
|
|
||||||
|
; Namespace
|
||||||
|
|
||||||
|
(namespace) @namespace
|
||||||
|
|
||||||
|
; Includes
|
||||||
|
|
||||||
|
[
|
||||||
|
"use"
|
||||||
|
] @include
|
||||||
|
|
||||||
|
; Builtins
|
||||||
|
|
||||||
|
(primitive) @type.builtin
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"intEnum"
|
||||||
|
"list"
|
||||||
|
"map"
|
||||||
|
"set"
|
||||||
|
] @type.builtin
|
||||||
|
|
||||||
|
; Fields (Members)
|
||||||
|
|
||||||
|
; (field) @field
|
||||||
|
|
||||||
|
(key_identifier) @field
|
||||||
|
(shape_member
|
||||||
|
(field) @field)
|
||||||
|
(operation_field) @field
|
||||||
|
(operation_error_field) @field
|
||||||
|
|
||||||
|
; Constants
|
||||||
|
|
||||||
|
(enum_member
|
||||||
|
(enum_field) @constant)
|
||||||
|
|
||||||
|
; Types
|
||||||
|
|
||||||
|
(identifier) @type
|
||||||
|
(structure_resource
|
||||||
|
(shape_id) @type)
|
||||||
|
|
||||||
|
; Attributes
|
||||||
|
|
||||||
|
(mixins
|
||||||
|
(shape_id) @attribute)
|
||||||
|
(trait_statement
|
||||||
|
(shape_id (#set! "priority" 105)) @attribute)
|
||||||
|
|
||||||
|
; Operators
|
||||||
|
|
||||||
|
[
|
||||||
|
"@"
|
||||||
|
"-"
|
||||||
|
"="
|
||||||
|
":="
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
; Keywords
|
||||||
|
|
||||||
|
[
|
||||||
|
"namespace"
|
||||||
|
"service"
|
||||||
|
"structure"
|
||||||
|
"operation"
|
||||||
|
"union"
|
||||||
|
"resource"
|
||||||
|
"metadata"
|
||||||
|
"apply"
|
||||||
|
"for"
|
||||||
|
"with"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
; Literals
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
|
(number) @number
|
||||||
|
|
||||||
|
(float) @float
|
||||||
|
|
||||||
|
(boolean) @boolean
|
||||||
|
|
||||||
|
(null) @constant.builtin
|
||||||
|
|
||||||
|
; Misc
|
||||||
|
|
||||||
|
[
|
||||||
|
"$"
|
||||||
|
"#"
|
||||||
|
] @punctuation.special
|
||||||
|
|
||||||
|
["{" "}"] @punctuation.bracket
|
||||||
|
|
||||||
|
["(" ")"] @punctuation.bracket
|
||||||
|
|
||||||
|
["[" "]"] @punctuation.bracket
|
||||||
|
|
||||||
|
[
|
||||||
|
":"
|
||||||
|
"."
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
; Comments
|
||||||
|
|
||||||
|
[
|
||||||
|
(comment)
|
||||||
|
(documentation_comment)
|
||||||
|
] @comment @spell
|
||||||
Loading…
Add table
Add a link
Reference in a new issue