From b4fe31cad61caa64ae735db104a4d510ad14c6d7 Mon Sep 17 00:00:00 2001 From: Alexander Brevig Date: Fri, 16 Jun 2023 23:12:29 +0200 Subject: [PATCH] Add forth-lsp and update tree-sitter-forth (#7334) * feat: add forth lsp and update tree sitter * fix: update highlights --- book/src/generated/lang-support.md | 2 +- languages.toml | 4 +++- runtime/queries/forth/highlights.scm | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index dbf4d3e05..e2f627347 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -41,7 +41,7 @@ | erlang | ✓ | ✓ | | `erlang_ls` | | esdl | ✓ | | | | | fish | ✓ | ✓ | ✓ | | -| forth | ✓ | | | | +| forth | ✓ | | | `forth-lsp` | | fortran | ✓ | | ✓ | `fortls` | | gdscript | ✓ | ✓ | ✓ | | | git-attributes | ✓ | | | | diff --git a/languages.toml b/languages.toml index 3dec26938..ef7b0bf11 100644 --- a/languages.toml +++ b/languages.toml @@ -24,6 +24,7 @@ elm-language-server = { command = "elm-language-server" } elvish = { command = "elvish", args = ["-lsp"] } erlang-ls = { command = "erlang_ls" } forc = { command = "forc", args = ["lsp"] } +forth-lsp = { command = "forth-lsp" } fortls = { command = "fortls", args = ["--lowercase_intrinsics"] } gleam = { command = "gleam", args = ["lsp"] } haskell-language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] } @@ -2606,11 +2607,12 @@ injection-regex = "forth" file-types = ["fs", "forth", "fth", "4th"] roots = [] comment-token = "\\" +language-servers = [ "forth-lsp" ] indent = { tab-width = 3, unit = " " } [[grammar]] name = "forth" -source = { git = "https://github.com/alexanderbrevig/tree-sitter-forth", rev = "c6fae50a17763af827604627c0fa9e4604aaac0b" } +source = { git = "https://github.com/alexanderbrevig/tree-sitter-forth", rev = "304ed77beb113e37af38b20ff14e3c37bf350d10" } [[language]] name = "t32" diff --git a/runtime/queries/forth/highlights.scm b/runtime/queries/forth/highlights.scm index 7be0d132e..e3e494f63 100644 --- a/runtime/queries/forth/highlights.scm +++ b/runtime/queries/forth/highlights.scm @@ -1,7 +1,6 @@ ([(start_definition)(end_definition)] @keyword) -([(lparen) (rparen)] @punctuation.bracket) -((stack_effect_sep) @punctuation) ((number) @constant) +((string) @string) ((word) @function) ((comment) @comment) ([(core)] @type)