on master help sign in
Add support for Forth (#7256)
commit78e869542022638af482c0dd85a07086a942907a authorAlexander Brevig <alexanderbrevig@gmail.com> dateTue 6 Jun 2023, 15:14 (3 years ago) parent71688a3
3 files changed+22
book/src/generated/lang-support.md+1 languages.toml+13 runtime/queries/forth/highlights.scm+8
book/src/generated/lang-support.md+1
@@ -41,6 +41,7 @@
4141| erlang | ✓ | ✓ | | `erlang_ls` |
4242| esdl | ✓ | | | |
4343| fish | ✓ | ✓ | ✓ | |
44+| forth | ✓ | | | |
4445| fortran | ✓ | | ✓ | `fortls` |
4546| gdscript | ✓ | ✓ | ✓ | |
4647| git-attributes | ✓ | | | |
languages.toml+13
@@ -2592,3 +2592,16 @@ indent = { tab-width = 4, unit = " " }
25922592[[grammar]]
25932593name = "blueprint"
25942594source = { git = "https://gitlab.com/gabmus/tree-sitter-blueprint", rev = "7f1a5df44861291d6951b6b2146a9fef4c226e14" }
2595+
2596+[[language]]
2597+name = "forth"
2598+scope = "source.forth"
2599+injection-regex = "forth"
2600+file-types = ["fs", "forth", "fth", "4th"]
2601+roots = []
2602+comment-token = "\\"
2603+indent = { tab-width = 3, unit = " " }
2604+
2605+[[grammar]]
2606+name = "forth"
2607+source = { git = "https://github.com/alexanderbrevig/tree-sitter-forth", rev = "c6fae50a17763af827604627c0fa9e4604aaac0b" }
runtime/queries/forth/highlights.scmnew file+8
@@ -0,0 +1,8 @@
1+([(start_definition)(end_definition)] @keyword)
2+([(lparen) (rparen)] @punctuation.bracket)
3+((stack_effect_sep) @punctuation)
4+((number) @constant)
5+((word) @function)
6+((comment) @comment)
7+([(core)] @type)
8+([(operator)] @operator)