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

Julia #145

Closed
1 task done
giancarloantonucci opened this issue Oct 10, 2022 · 25 comments · Fixed by #580
Closed
1 task done

Julia #145

giancarloantonucci opened this issue Oct 10, 2022 · 25 comments · Fixed by #580
Labels
language A request to add a language extension

Comments

@giancarloantonucci
Copy link

Check for existing issues

  • Completed

Language

Julia

Tree Sitter parser link

https://github.com/tree-sitter/tree-sitter-julia

Language server link

https://github.com/julia-vscode/LanguageServer.jl

Misc notes

It would be really useful to have support for the Julia language (https://julialang.org). Not much to say except that it's one of the rising stars in the world of scientific computing. I used it for research at uni and now I use it at work.

@giancarloantonucci giancarloantonucci added the language A request to add a language extension label Oct 10, 2022
@MultisampledNight
Copy link

Using Julia also often means using Unicode chars such as through typing \ne and then Tab, it might be worth checking out https://github.com/JuliaEditorSupport to see what users are accustomed to.

@rdboyes
Copy link

rdboyes commented Feb 18, 2023

Zed could easily become the editor of choice for Julia - would love to see this happen

@gbaraldi
Copy link

It would be lovely to have julia support on zed.

@pvlkhm
Copy link

pvlkhm commented Jun 1, 2023

Friends, I will support my colleagues above: need to support Julia and thereby cover a large mass of people with a perspective for the future; especially Julia is an ideological relative of Rust

@hovsater
Copy link

hovsater commented Jun 1, 2023

Work have begun to enable Zed to be extended with other languages. Unfortunately, I don't have an estimate on when this will be available for the general public. Stay tuned. 🙂

@shobhan126
Copy link

shobhan126 commented Jul 20, 2023

It would be amazing to have Julia support on Zed! thanks zed team i really enjoy using it!

@3f6a
Copy link

3f6a commented Aug 5, 2023

If Zed supports Julia I will definitely try it out!

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@Robert-j7
Copy link

Patently waiting. Can we send snippets to repl as well?

@3f6a
Copy link

3f6a commented Jan 26, 2024

Perhaps zed-industries/zed#6690 (Zig support) can serve as inspiration. I would guess a similar approach would work here?

@3f6a
Copy link

3f6a commented Jan 27, 2024

Also, Haskell: zed-industries/zed#6786, Gleam: zed-industries/zed#6733

@alstat
Copy link

alstat commented Feb 8, 2024

With Haskel, Gleam, and Zig recently added. I hope Julia will be next. Looking forward to this.

@whiterock
Copy link

Anything happening here? (Im)patiently waiting :)

@JosephTLyons JosephTLyons changed the title Julia support Julia Feb 26, 2024
@JosephTLyons JosephTLyons transferred this issue from zed-industries/zed Feb 26, 2024
@marcora
Copy link

marcora commented Feb 29, 2024

+1

@rawjeev
Copy link

rawjeev commented Mar 20, 2024

Zed is crisp and thrilling. Can't wait to see Julia Language support on Zed.

@Pangoraw
Copy link
Contributor

For anyone interested in starting from zed-industries/zed#8133 to build an extension, there is a blocker that the tree-sitter grammar requires too much memory to build to WebAssembly (see tree-sitter/tree-sitter-julia#124).

@piechologist
Copy link
Contributor

tree-sitter build-wasm runs fine on an Ubuntu VPS with 128 GB RAM. The compiler just needs 57214472 k resident size (cough) and 13 minutes. So, a 64 GB machine may be not enough. The resulting julia.wasm is 9.2 MB big (compare this to 451 kB for the R grammar).

@JosephTLyons @maxdeviant Is building that beast too much for your workflows here or should we just try?

Im still struggling to understand if *.wasm files are architecture independent. Can I use the julia.wasm built on Linux x64 on an Intel Mac?

@MultisampledNight
Copy link

(fwiw yes WASM files are architecture independent. WASM is an architecture of its own, and needs a runtime to actually evaluate it. In the case of the web, this runtime is e.g. the browser)

@maxdeviant
Copy link
Member

tree-sitter build-wasm runs fine on an Ubuntu VPS with 128 GB RAM. The compiler just needs 57214472 k resident size (cough) and 13 minutes. So, a 64 GB machine may be not enough. The resulting julia.wasm is 9.2 MB big (compare this to 451 kB for the R grammar).

@JosephTLyons @maxdeviant Is building that beast too much for your workflows here or should we just try?

Im still struggling to understand if *.wasm files are architecture independent. Can I use the julia.wasm built on Linux x64 on an Intel Mac?

Sheesh, I wonder why it is so resource-intensive?

One thing that you could try is adding it as a dev extension in Zed and let Zed build the Wasm file, as we use a different approach for building the Wasm grammar (calling clang directly instead of going through the tree-sitter CLI).

@piechologist
Copy link
Contributor

One thing that you could try is adding it as a dev extension in Zed and let Zed build the Wasm file, as we use a different approach for building the Wasm grammar (calling clang directly instead of going through the tree-sitter CLI).

That won't help, a single clang process consumes all that memory.

@maxbrunsfeld
Copy link
Contributor

This problem should be solved in the latest version of Tree-sitter-julia, due to some improvements to Tree-sitter's code-gen.

Compiling the Julia parser to WASM is still a little bit slow, but no problem to do on our CI machines. If anyone wants to develop the extension, it should be very straightforward.

@piechologist
Copy link
Contributor

I've got the Tree-sitter part (highlights, outline, etc.) working locally. Looks great so far! I'm not into the LSP stuff though.

@Pangoraw: Are you interested in putting it together? I'd be happy to contribute to the queries (I had to make some adjustments for the updated grammar). Alternatively, https://github.com/JuliaEditorSupport might be a good place to collaborate?

@Pangoraw
Copy link
Contributor

This problem should be solved in the latest version of Tree-sitter-julia, due to some improvements to Tree-sitter's code-gen.

Thank you, the wasm parser now builds smoothly on my 8Gb machine!

@piechologist great that you have the grammar working with the updates!

I have a version with LSP here https://github.com/zed-industries/zed/compare/main...Pangoraw:zed:zed_julia?expand=1 (i had to comment some grammar queries), I will ask on slack to get a repo under https://github.com/JuliaEditorSupport as that would be the best way to collaborate.

@3f6a
Copy link

3f6a commented Apr 16, 2024

That's great news. Excited to try Julia on Zed.

@maxbrunsfeld
Copy link
Contributor

That's great to hear @Pangoraw, let me know if you need help. I'm happy to see Julia supported.

maxdeviant added a commit that referenced this issue Apr 19, 2024
Closes #145.

:wave: @piechologist there is now
[JuliaEditorSupport/zed-julia](https://github.com/JuliaEditorSupport/zed-julia)
if you want to collaborate.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
@rawjeev
Copy link

rawjeev commented May 11, 2024

Lovely! Will try zed with Julia support.

cabrinha pushed a commit to cabrinha/extensions that referenced this issue Aug 9, 2024
Closes zed-industries#145.

:wave: @piechologist there is now
[JuliaEditorSupport/zed-julia](https://github.com/JuliaEditorSupport/zed-julia)
if you want to collaborate.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
adorabilis pushed a commit to adorabilis/zed-extensions that referenced this issue Aug 17, 2024
Closes zed-industries#145.

:wave: @piechologist there is now
[JuliaEditorSupport/zed-julia](https://github.com/JuliaEditorSupport/zed-julia)
if you want to collaborate.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language A request to add a language extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.