fiv

fiv

I really like the Zed editor but recently code completion just stopped working. I still get syntax highlighting just no code completion. Is anybody having the same issue or know what the problem might be.

Showing Posts 1 to 10

LostKobrakai

LostKobrakai

The first step should always be looking at the lsp logs, which you can open via the command palette in zed.

fiv

fiv OP

Not exactly sure what I’m looking for in Logs but this is what my logs look like. I wonder if this line is the problem

server "elixir-ls": failed to spawn command. path: "/Users/jamesavery/Library/Application 
2024-07-25T18:12:24.636696Z [INFO] starting language server "elixir-ls", path: "/Users/jamesavery/Dev/otp_apps/delta", id: 5
2024-07-25T18:12:24.753174Z [INFO] starting language server. binary path: "/Users/jamesavery/Library/Application Support/Zed/extensions/work/elixir/elixir-ls-v0.22.1/language_server.sh", working directory: "/Users/jamesavery/Dev/otp_apps/delta", args: []
2024-07-25T18:12:24.753329Z [ERROR] failed to start language server "elixir-ls": failed to spawn command. path: "/Users/jamesavery/Library/Application Support/Zed/extensions/work/elixir/elixir-ls-v0.22.1/language_server.sh", working directory: "/Users/jamesavery/Dev/otp_apps/delta", args: []
2024-07-25T18:12:24.753386Z [ERROR] server stderr: Some("")
2024-07-25T18:12:24.753434Z [ERROR] Hit 4 reinstallation attempts for "elixir-ls"
2024-07-25T19:40:44.760385Z [INFO] Initializing default prettier with plugins {}
2024-07-25T19:40:44.762037Z [INFO] starting language servers for Elixir: elixir-ls
2024-07-25T19:40:44.762262Z [INFO] starting language servers for Elixir: elixir-ls
2024-07-25T19:40:44.762322Z [INFO] starting language servers for Elixir: elixir-ls
2024-07-25T19:40:44.819125Z [INFO] Initializing default prettier with plugins {}
2024-07-25T19:40:44.819226Z [INFO] starting language servers for Elixir: elixir-ls
2024-07-25T19:40:44.820365Z [INFO] Initializing default prettier with plugins {}
2024-07-25T19:40:44.820426Z [INFO] starting language servers for Elixir: elixir-ls
2024-07-25T19:40:44.820646Z [INFO] Initializing default prettier with plugins {}
2024-07-25T19:40:44.820701Z [INFO] starting language servers for Elixir: elixir-ls
2024-07-25T19:40:44.820832Z [INFO] Initializing default prettier with plugins {}
2024-07-25T19:40:44.820881Z [INFO] starting language servers for Elixir: elixir-ls
anderkonzen

anderkonzen

I was getting this error too, but I did not know when it started on my mac (maybe a zed update?).

I tried to uninstall zed, compared releases of elixir-ls, etc, but I finally made it work by making the elixir-ls scripts that zed downloads to be executable. Comparing the version between VSCode and zed, I noticed that the elixir-ls release files were not marked as executable:

By running chmod +x ... things started to work again.

larshei

larshei

Nice, that solved it for me.

Also, I added the following overall config for Elixir, maybe it is useful for someone :slight_smile:

Selects the language server and configures format on save.

Most of it was taken from the zed manual

{
  "languages": {
    "Elixir": {
      "show_inline_completions": true,
      "language_servers": ["elixir-ls"],
      "format_on_save": {
        "external": {
          "command": "mix",
          "arguments": ["format", "--stdin-filename", "{buffer_path}", "-"]
        }
      }
    }
  }
}
soyjeansoy

soyjeansoy

this worked on my problem :pray:t5:

jam

jam

I ran into this as well. Fwiw, I had to add this to my settings.json

"lsp": {
    "elixir-ls": {},
    ...
}
larshei

larshei

Just ran across this, might be helpful for someone:
Zed has builtin tailwind support, which can be enabled as well.

Adjust to config as follows:

-     "language_servers": ["elixir-ls"],
+     "language_servers": ["elixir-ls", "tailwindcss-language-server"],

theagilecoder

theagilecoder

I have just installed Zed with the elixir official extension. It should work by default right in the .heex files ?

Code completion works for me in .ex file but doesn’t in .heex

If I create a regular .html file in zed, then the HTML autocomplete works as expected.

katafrakt

katafrakt

To be honest I’m not sure what you expect here. There is no Elixir code in the screenshot where the code completion could happen. Could you elaborate?

theagilecoder

theagilecoder

Providing more details:

In heex files I dont get autocomplete of HTML tags. For ex. if I type ```<div>``` then the div autoclosing tags should be autogenerated like in .html files in zed.

In .html files its working as expected.

Zed claims HEEX support in its elixir support is on by default. Elixir | Elixir

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews