Skip to content

Commit

Permalink
Add support for Forth (helix-editor#7256)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBrevig authored and mtoohey31 committed Jun 2, 2024
1 parent 6572d19 commit 6360667
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
| erlang ||| | `erlang_ls` |
| esdl || | | |
| fish |||| |
| forth || | | |
| fortran || || `fortls` |
| gdscript |||| |
| git-attributes || | | |
Expand Down
13 changes: 13 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2592,3 +2592,16 @@ indent = { tab-width = 4, unit = " " }
[[grammar]]
name = "blueprint"
source = { git = "https://gitlab.com/gabmus/tree-sitter-blueprint", rev = "7f1a5df44861291d6951b6b2146a9fef4c226e14" }

[[language]]
name = "forth"
scope = "source.forth"
injection-regex = "forth"
file-types = ["fs", "forth", "fth", "4th"]
roots = []
comment-token = "\\"
indent = { tab-width = 3, unit = " " }

[[grammar]]
name = "forth"
source = { git = "https://github.com/alexanderbrevig/tree-sitter-forth", rev = "c6fae50a17763af827604627c0fa9e4604aaac0b" }
8 changes: 8 additions & 0 deletions runtime/queries/forth/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
([(start_definition)(end_definition)] @keyword)
([(lparen) (rparen)] @punctuation.bracket)
((stack_effect_sep) @punctuation)
((number) @constant)
((word) @function)
((comment) @comment)
([(core)] @type)
([(operator)] @operator)

0 comments on commit 6360667

Please sign in to comment.