From 6066f44e9177ded2e835e471e50b3fbd7231d62b Mon Sep 17 00:00:00 2001 From: Will Sommers Date: Sat, 8 Oct 2022 22:27:17 -0400 Subject: [PATCH 1/2] Add hack and flow languages --- Makefile | 2 +- package.json | 3 +++ src/extension.ts | 2 ++ yarn.lock | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 62eb5a3..ed641a0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # For generating .wasm files for parsers # See https://www.npmjs.com/package/web-tree-sitter -LANGUAGES = agda bash c c-sharp clojure cpp css elm go haskell html java javascript json kotlin latex markdown php python query ruby rust scala scss sparql talon tsx typescript yaml +LANGUAGES = agda bash c c-sharp clojure cpp css elm go hack haskell html java javascript json kotlin latex markdown php python query ruby rust scala scss sparql talon tsx typescript yaml # NOTE: Update the version number in the filepath for web-tree-sitter in package.json, diff --git a/package.json b/package.json index 17c7b7f..ef89c88 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,9 @@ "onLanguage:css", "onLanguage:csharp", "onLanguage:elm", + "onLanguage:flow", "onLanguage:go", + "onLanguage:hack", "onLanguage:haskell", "onLanguage:html", "onLanguage:java", @@ -93,6 +95,7 @@ "tree-sitter-cpp": "^0.19.0", "@elm-tooling/tree-sitter-elm": "github:elm-tooling/tree-sitter-elm#0aecfbf69f0c9bcdfada0f6f2c5398235c23949f", "tree-sitter-go": "^0.19.0", + "tree-sitter-hack": "github:slackhq/tree-sitter-hack#b7bd6928532ada34dddb1dece4a158ab62c6e783", "tree-sitter-haskell": "github:tree-sitter/tree-sitter-haskell#d6ccd2d9c40bdec29fee0027ef04fe5ff1ae4ceb", "tree-sitter-html": "^0.19.0", "tree-sitter-java": "github:tree-sitter/tree-sitter-java#ac14b4b1884102839455d32543ab6d53ae089ab7", diff --git a/src/extension.ts b/src/extension.ts index 3a00268..cc4d678 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -19,7 +19,9 @@ const languages: { csharp: { module: "tree-sitter-c-sharp" }, css: { module: "tree-sitter-css" }, elm: { module: "tree-sitter-elm" }, + flow: { module: "tree-sitter-tsx" }, go: { module: "tree-sitter-go" }, + hack: { module: "tree-sitter-hack"}, haskell: { module: "tree-sitter-haskell" }, html: { module: "tree-sitter-html" }, java: { module: "tree-sitter-java" }, diff --git a/yarn.lock b/yarn.lock index 15f0fdb..2e5ad78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2341,6 +2341,12 @@ tree-sitter-go@^0.19.0: dependencies: nan "^2.14.0" +"tree-sitter-hack@github:slackhq/tree-sitter-hack#b7bd6928532ada34dddb1dece4a158ab62c6e783": + version "0.0.4" + resolved "https://codeload.github.com/slackhq/tree-sitter-hack/tar.gz/b7bd6928532ada34dddb1dece4a158ab62c6e783" + dependencies: + nan "^2.14.1" + "tree-sitter-haskell@github:tree-sitter/tree-sitter-haskell#d6ccd2d9c40bdec29fee0027ef04fe5ff1ae4ceb": version "0.14.0" resolved "https://codeload.github.com/tree-sitter/tree-sitter-haskell/tar.gz/d6ccd2d9c40bdec29fee0027ef04fe5ff1ae4ceb" From cbf44bc7badf09a45f3189875fd326522470b039 Mon Sep 17 00:00:00 2001 From: Will Sommers Date: Sat, 8 Oct 2022 22:31:45 -0400 Subject: [PATCH 2/2] Back out of flow --- package.json | 1 - src/extension.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/package.json b/package.json index ef89c88..a1b6d20 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "onLanguage:css", "onLanguage:csharp", "onLanguage:elm", - "onLanguage:flow", "onLanguage:go", "onLanguage:hack", "onLanguage:haskell", diff --git a/src/extension.ts b/src/extension.ts index cc4d678..077870c 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -19,7 +19,6 @@ const languages: { csharp: { module: "tree-sitter-c-sharp" }, css: { module: "tree-sitter-css" }, elm: { module: "tree-sitter-elm" }, - flow: { module: "tree-sitter-tsx" }, go: { module: "tree-sitter-go" }, hack: { module: "tree-sitter-hack"}, haskell: { module: "tree-sitter-haskell" },