Stream: beginners

Topic: ✔ Setting up ZED...


view this post on Zulip Shaiden Spreitzer (May 27 2024 at 13:52):

Hi! I'm just trying the ZED editor (never used before), installed the Roc extension and syntax highlight seems to work. But how do I connect to the language server? Running in the background doesn't do anything!
Besides that do you folks have any tips/tricks on how to make Roc dev on mac (or generally) a pleasant experience??

view this post on Zulip Alf Richter (May 28 2024 at 04:28):

The extension assumed that roc + roc language server is installed and can be found in the PATH.
Here from Website:

Preqrequisites https://github.com/h2000/zed-roc#preqrequisites

In Zed you can use the action zed: log to show zed log.

view this post on Zulip Alf Richter (May 28 2024 at 05:03):

To install roc you could try out: https://github.com/appblue/rocup
I think you still need to add /usr/local/bin to your PATH env variable

view this post on Zulip Shaiden Spreitzer (May 28 2024 at 14:25):

Ok, solved. Copied roc_language_server into /usr/local/bin (this folder did not exist, had to create it). After that everything worked as expected

view this post on Zulip Notification Bot (May 28 2024 at 14:25):

Shaiden Spreitzer has marked this topic as resolved.

view this post on Zulip Niclas Ahden (May 29 2024 at 09:07):

@Shaiden Spreitzer Great that you solved it! Note that since you copied the binary, you'll need to copy it again if you install a new version of Roc in the future. If you don't, you'll have an outdated LSP running which will probably give you some wonky behaviour!

I'd humbly suggest that you install Roc using rocup now that you have a /usr/local/bin directory. That way it'll always work for you and it'll be a good experience!

If you don't want to use rocup, you could:

  1. Remove the copy of Roc LSP (rm /usr/local/bin/roc_language_server).
  2. Check where it's located by default (which roc_language_server). This'll depend on how you installed Roc.
  3. Add that directory to your PATH (https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7).

It'll now always work and be up-to-date when you install new versions of Roc!

PS. If you don't want to edit the PATH you could alternatively symlink the LSP binary to a directory that's already in your PATH.

Happy Roc-ing! Let me know if I can help with anything!

view this post on Zulip Shaiden Spreitzer (May 29 2024 at 14:17):

Sounds great! Thanks!


Last updated: Jul 06 2025 at 12:14 UTC