Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PureScript LSP/Highlighting support #6911

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

ivanmoreau
Copy link
Contributor

This PR adds basic support for the language using the purescript-language-server.

Release Notes:

  • Added support for PureScript.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 28, 2024
@ivanmoreau
Copy link
Contributor Author

Screen Shot 2024-01-27 at 22 08 42

An example of the LSP/Highlighting properly working.

@maxdeviant maxdeviant changed the title [LSP/Languages] PureScript LSP/Highlighting support. Add PureScript LSP/Highlighting support Jan 28, 2024
container_dir: PathBuf,
node: &dyn NodeRuntime,
) -> Option<LanguageServerBinary> {
(|| async move {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have an async_maybe! macro in our util crate that can make this a bit nicer than having the IIFE.

Here's an example of it used in another LSP adapter:

async_maybe!({

@maxdeviant
Copy link
Member

I'm seeing some weird output in the generated assets/licenses.md file after running script/generate-licenses.

Namely, it seems we're pointing to the tree-sitter-php repo:

* [tree-sitter-purescript 1.0.0]( https://github.com/tree-sitter/tree-sitter-php )

It looks like the cause is that Cargo.toml is pointing to the wrong repository: https://github.com/ivanmoreau/tree-sitter-purescript/blob/4f623d7d245e76f8ab2a5ea663d8a257d48fbd97/Cargo.toml#L7

@ivanmoreau
Copy link
Contributor Author

Hi @maxdeviant!

I solved the mentioned problems, including the removal of some code that wasn't essential for the functionality (it was merely a leftover from an existing implementation with Node that I used as a template).

@maxdeviant
Copy link
Member

Looks good! Thanks for getting this added, @ivanmoreau!

@maxdeviant maxdeviant merged commit db68fc5 into zed-industries:main Jan 28, 2024
4 checks passed
postsolar added a commit to postsolar/tree-sitter-purescript that referenced this pull request Jan 29, 2024
PureScript support has been recently added to Zed editor in zed-industries/zed#6911, updated the README accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants