From 2d958d6c50b10318e29f6dacc291d8fcafd66de9 Mon Sep 17 00:00:00 2001 From: Dario Oddenino Date: Fri, 14 Oct 2022 18:57:52 +0200 Subject: [PATCH] Add support for Purescript language (#4242) --- book/src/generated/lang-support.md | 1 + languages.toml | 13 +++++++++++++ runtime/queries/purescript/highlights.scm | 1 + runtime/queries/purescript/injections.scm | 1 + runtime/queries/purescript/locals.scm | 1 + 5 files changed, 17 insertions(+) create mode 100644 runtime/queries/purescript/highlights.scm create mode 100644 runtime/queries/purescript/injections.scm create mode 100644 runtime/queries/purescript/locals.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 74e637961..3fe9ef70e 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -86,6 +86,7 @@ | prisma | ✓ | | | `prisma-language-server` | | prolog | | | | `swipl` | | protobuf | ✓ | | ✓ | | +| purescript | ✓ | | | `purescript-language-server` | | python | ✓ | ✓ | ✓ | `pylsp` | | r | ✓ | | | `R` | | racket | | | | `racket` | diff --git a/languages.toml b/languages.toml index 24110865d..7eb45d8b2 100644 --- a/languages.toml +++ b/languages.toml @@ -723,6 +723,19 @@ indent = { tab-width = 2, unit = " " } name = "haskell" source = { git = "https://github.com/tree-sitter/tree-sitter-haskell", rev = "b6ec26f181dd059eedd506fa5fbeae1b8e5556c8" } +[[language]] +name = "purescript" +scope = "source.purescript" +injection-regex = "purescript" +file-types = ["purs"] +roots = ["spago.dhall", "bower.json"] +comment-token = "--" +language-server = { command = "purescript-language-server", args = ["--stdio"] } +indent = { tab-width = 2, unit = " " } +auto-format = true +formatter = { command = "purs-tidy", args = ["format"] } +grammar = "haskell" + [[language]] name = "zig" scope = "source.zig" diff --git a/runtime/queries/purescript/highlights.scm b/runtime/queries/purescript/highlights.scm new file mode 100644 index 000000000..ef073eb25 --- /dev/null +++ b/runtime/queries/purescript/highlights.scm @@ -0,0 +1 @@ +; inherits: haskell diff --git a/runtime/queries/purescript/injections.scm b/runtime/queries/purescript/injections.scm new file mode 100644 index 000000000..ef073eb25 --- /dev/null +++ b/runtime/queries/purescript/injections.scm @@ -0,0 +1 @@ +; inherits: haskell diff --git a/runtime/queries/purescript/locals.scm b/runtime/queries/purescript/locals.scm new file mode 100644 index 000000000..ef073eb25 --- /dev/null +++ b/runtime/queries/purescript/locals.scm @@ -0,0 +1 @@ +; inherits: haskell