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 initial support for janet-lang #9081

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Conversation

pnelson
Copy link
Contributor

@pnelson pnelson commented Dec 14, 2023

Resolves #4617 #4574

languages.toml Outdated
file-types = ["janet"]
comment-token = "#"
indent = { tab-width = 2, unit = " " }
roots = []
Copy link
Member

Choose a reason for hiding this comment

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

This key can be omitted since #8803

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-language-support Area: Support for programming/text languages labels Dec 14, 2023
@archseer archseer merged commit b4571c2 into helix-editor:master Dec 15, 2023
6 checks passed
@mikkelfj
Copy link

Great to see this, but as far as I can tell, clojure-lsp listed in the PR requires openjdk installed on macos, which completely defeats the point of using janet in the first place.

@the-mikedavis
Copy link
Member

This PR doesn't configure a language server, it's just re-using the highlighting from clojure. If there's a language server for janet, that could be added in a follow-up PR

@mikkelfj
Copy link

Yes, I just realized. Sorry for the noise.

@pnelson pnelson deleted the janet-lang branch December 19, 2023 23:11
@sogaiu
Copy link
Contributor

sogaiu commented Jan 5, 2024

FWIW, I have a branch based on a helix from 2023-10 or so that uses tree-sitter-janet-simple. The branch also includes a highlighting query file that works with the grammar.

I was waiting for lsp support to improve, but perhaps that can be added later?

Please let me know if there is any interest.

@pnelson
Copy link
Contributor Author

pnelson commented Jan 5, 2024

Please let me know if there is any interest.

Absolutely! 🚀

@sogaiu
Copy link
Contributor

sogaiu commented Jan 5, 2024

Ok, I've created a new branch that's based on 7e389b6.

Before I make a PR, I have a few questions:

Hmm...perhaps better to make a PR and ask there?

Update: made #9247.


[1] There is more than one tree-sitter grammar for Janet -- though the other one I know of is not in use in Emacs or Neovim or elsewhere -- it took a different approach and possibly some folks might want to use it for certain situations. They were started around the same time but I changed the name of mine to avoid name collisions.

dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
* Add initial support for janet-lang

* Use default roots for janet-lang
@rokf
Copy link

rokf commented May 5, 2024

I've tried https://github.com/CFiggers/janet-lsp today and it's working. I've tested this on macOS with Janet installed through brew. It doesn't have many features yet though, but it could be a start 🙂

First I had to make sure that the location where binaries that are installed through jpm are placed was in my path, i.e.:

export PATH=/opt/homebrew/Cellar/janet/HEAD-2f0c789/bin:$PATH

I've (somewhat) followed the installation instructions from the README:

git clone https://github.com/CFiggers/janet-lsp
cd janet-lsp
jpm -l deps
jpm install

This is what I've put into languages.toml in my ~/.config/helix folder:

[language-server.janet-lsp]
command = "janet-lsp"

[[language]]
name= "janet"
language-servers = [ { name = "janet-lsp" } ]

@rokf rokf mentioned this pull request May 5, 2024
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* Add initial support for janet-lang

* Use default roots for janet-lang
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
* Add initial support for janet-lang

* Use default roots for janet-lang
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* Add initial support for janet-lang

* Use default roots for janet-lang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants