From 653aec48d40fe83346482057cbe5e1596f9d4846 Mon Sep 17 00:00:00 2001 From: postsolar <120750161+postsolar@users.noreply.github.com> Date: Fri, 23 Feb 2024 09:07:49 +0200 Subject: [PATCH] Re-enable PureScript on Linux and Windows --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- crates/zed/Cargo.toml | 4 +--- crates/zed/src/languages.rs | 5 ----- docs/src/languages/purescript.md | 2 +- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20d9ea6c5189e..a986839685603 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10398,8 +10398,8 @@ dependencies = [ [[package]] name = "tree-sitter-purescript" -version = "1.0.0" -source = "git+https://github.com/ivanmoreau/tree-sitter-purescript?rev=a37140f0c7034977b90faa73c94fcb8a5e45ed08#a37140f0c7034977b90faa73c94fcb8a5e45ed08" +version = "0.1.0" +source = "git+https://github.com/postsolar/tree-sitter-purescript?rev=v0.1.0#0554811a512b9cec08b5a83ce9096eb22da18213" dependencies = [ "cc", "tree-sitter", diff --git a/Cargo.toml b/Cargo.toml index 457d8d9f3c07e..e15d0b0874f44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -262,7 +262,7 @@ tree-sitter-ocaml = { git = "https://github.com/tree-sitter/tree-sitter-ocaml", tree-sitter-php = "0.21.1" tree-sitter-prisma-io = { git = "https://github.com/victorhqc/tree-sitter-prisma" } tree-sitter-proto = { git = "https://github.com/rewinfrey/tree-sitter-proto", rev = "36d54f288aee112f13a67b550ad32634d0c2cb52" } -tree-sitter-purescript = { git = "https://github.com/ivanmoreau/tree-sitter-purescript", rev = "a37140f0c7034977b90faa73c94fcb8a5e45ed08" } +tree-sitter-purescript = { git = "https://github.com/postsolar/tree-sitter-purescript", rev = "v0.1.0" } tree-sitter-python = "0.20.2" tree-sitter-racket = { git = "https://github.com/zed-industries/tree-sitter-racket", rev = "eb010cf2c674c6fd9a6316a84e28ef90190fe51a" } tree-sitter-ruby = "0.20.0" diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 74e010b152780..cd3e97d0628c3 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -144,6 +144,7 @@ tree-sitter-ocaml.workspace = true tree-sitter-php.workspace = true tree-sitter-prisma-io.workspace = true tree-sitter-proto.workspace = true +tree-sitter-purescript.workspace = true tree-sitter-python.workspace = true tree-sitter-racket.workspace = true tree-sitter-ruby.workspace = true @@ -166,9 +167,6 @@ welcome.workspace = true workspace.workspace = true zed_actions.workspace = true -[target.'cfg(not(windows))'.dependencies] -tree-sitter-purescript.workspace = true - [dev-dependencies] call = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] } diff --git a/crates/zed/src/languages.rs b/crates/zed/src/languages.rs index 34fd7642bc0d8..f90b31364de91 100644 --- a/crates/zed/src/languages.rs +++ b/crates/zed/src/languages.rs @@ -106,7 +106,6 @@ pub fn init( ("php", tree_sitter_php::language_php()), ("prisma", tree_sitter_prisma_io::language()), ("proto", tree_sitter_proto::language()), - #[cfg(not(any(target_os = "linux", target_os = "windows")))] ("purescript", tree_sitter_purescript::language()), ("python", tree_sitter_python::language()), ("racket", tree_sitter_racket::language()), @@ -294,10 +293,6 @@ pub fn init( Arc::new(tailwind::TailwindLspAdapter::new(node_runtime.clone())), ], ); - - // Produces a link error on linux due to duplicated `state_new` symbol - // todo!(linux): Restore purescript - #[cfg(not(target_os = "linux"))] language( "purescript", vec![Arc::new(purescript::PurescriptLspAdapter::new( diff --git a/docs/src/languages/purescript.md b/docs/src/languages/purescript.md index d534f861ace73..1c46886e58120 100644 --- a/docs/src/languages/purescript.md +++ b/docs/src/languages/purescript.md @@ -1,4 +1,4 @@ # PureScript -- Tree Sitter: [tree-sitter-purescript](https://github.com/ivanmoreau/tree-sitter-purescript) +- Tree Sitter: [tree-sitter-purescript](https://github.com/postsolar/tree-sitter-purescript) - Language Server: [purescript](https://github.com/nwolverson/purescript-language-server)