mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: add Forth
This commit is contained in:
parent
620b60b5ba
commit
7c935d6bd5
8 changed files with 42 additions and 0 deletions
|
|
@ -222,6 +222,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [firrtl](https://github.com/amaanq/tree-sitter-firrtl) (maintained by @amaanq)
|
||||
- [x] [fish](https://github.com/ram02z/tree-sitter-fish) (maintained by @ram02z)
|
||||
- [x] [foam](https://github.com/FoamScience/tree-sitter-foam) (experimental, maintained by @FoamScience)
|
||||
- [x] [forth](https://github.com/AlexanderBrevig/tree-sitter-forth) (maintained by @amaanq)
|
||||
- [x] [fortran](https://github.com/stadelmanma/tree-sitter-fortran) (maintained by @amaanq)
|
||||
- [x] [fsh](https://github.com/mgramigna/tree-sitter-fsh) (maintained by @mgramigna)
|
||||
- [x] [func](https://github.com/amaanq/tree-sitter-func) (maintained by @amaanq)
|
||||
|
|
|
|||
|
|
@ -146,6 +146,9 @@
|
|||
"foam": {
|
||||
"revision": "09e03445f49290450589c5d293610ab39434e3e4"
|
||||
},
|
||||
"forth": {
|
||||
"revision": "304ed77beb113e37af38b20ff14e3c37bf350d10"
|
||||
},
|
||||
"fortran": {
|
||||
"revision": "6828cf3629addb1706bdbbd33491e95f12b7042c"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -487,6 +487,14 @@ list.foam = {
|
|||
experimental = true,
|
||||
}
|
||||
|
||||
list.forth = {
|
||||
install_info = {
|
||||
url = "https://github.com/AlexanderBrevig/tree-sitter-forth",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = { "@amaanq" },
|
||||
}
|
||||
|
||||
list.fortran = {
|
||||
install_info = {
|
||||
url = "https://github.com/stadelmanma/tree-sitter-fortran",
|
||||
|
|
|
|||
1
queries/forth/folds.scm
Normal file
1
queries/forth/folds.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(word_definition) @fold
|
||||
21
queries/forth/highlights.scm
Normal file
21
queries/forth/highlights.scm
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
(core) @function
|
||||
|
||||
(operator) @operator
|
||||
|
||||
(word) @variable
|
||||
|
||||
((word) @constant
|
||||
(#lua-match? @constant "^[A-Z_]+$"))
|
||||
|
||||
(number) @number
|
||||
|
||||
(string) @string
|
||||
|
||||
[
|
||||
(start_definition)
|
||||
(end_definition)
|
||||
] @punctuation.delimiter
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(ERROR) @error
|
||||
3
queries/forth/indents.scm
Normal file
3
queries/forth/indents.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(word_definition) @indent.begin
|
||||
|
||||
(end_definition) @indent.end @indent.branch
|
||||
2
queries/forth/injections.scm
Normal file
2
queries/forth/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
3
queries/forth/locals.scm
Normal file
3
queries/forth/locals.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(word) @reference
|
||||
|
||||
(word_definition) @scope
|
||||
Loading…
Add table
Add a link
Reference in a new issue