zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.26k stars 2.73k forks source link

Elixir Lexical Crashing on Go To Definition #12746

Closed the-destro closed 3 months ago

the-destro commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Go To Definition is currently not working for me in elixir.

My current settings file:

// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
  "theme": "Ayu Dark",
  "ui_font_size": 16,
  "buffer_font_size": 16,
  "lsp": {
    "elm-language-server": {
      "initialization_options": {
        "disableElmLSDiagnostics": true,
        "onlyUpdateDiagnosticsOnSave": false,
        "elmReviewDiagnostics": "warning"
      }
    }
  },
  "languages": {
    "Elixir": {
      "language_servers": ["lexical", "!elixir-ls", "!next-ls", "..."]
    },
    "HEEX": {
      "language_servers": ["lexical", "!elixir-ls", "!next-ls", "..."]
    }
  }
}

RPC log snippet

{"error":{"code":-32603,"message":"** (FunctionClauseError) no function clause matching in LXical.Server.Provider.Handlers.Hover.resolve_entity/3\n    (lx_server 0.5.0) lib/lexical/server/provider/handlers/hover.ex:34: LXical.Server.Provider.Handlers.Hover.resolve_entity(%{__struct__: LXical.Project, entropy: 44859, project_module: nil, mix_exs_uri: \

Environment

Zed: v0.138.4 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

osiewicz commented 3 months ago

Can you reproduce it with other editor, e.g. Helix or VSCode?

the-destro commented 3 months ago

Can you reproduce it with other editor, e.g. Helix or VSCode?

Not in VS code. I'm not sure what version of lexical Zed uses

the-destro commented 3 months ago

Seems to be working lately? I'll close it for now

osiewicz commented 3 months ago

Could this be related? https://github.com/lexical-lsp/lexical/pull/753

the-destro commented 3 months ago

interesting...maybe? Is there a way to find out what version of lexical is used by the extension?