From c4233d26d4dc94183586f7cb4bcc9c39815d6e15 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 dbf4d3e05cfe9..e2f62734755fa 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 3dec269388d29..ef7b0bf11edae 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 7be0d132e52b2..e3e494f63cc89 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)