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
50.07k stars 3.07k forks source link

Enable additional Elixir Language Server configuration #4260

Closed mattbaker closed 7 months ago

mattbaker commented 10 months ago

Check for existing issues

Describe the feature

ElixirLS provides the ability to disable dialyzer, but I can't see a way to pass that configuration to Zed.

Is this possible? If so, we should update the ElixirLS docs. If not this would be a feature request.

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

No response

crbelaus commented 9 months ago

I was going to open a similar issue but found this one first.

Dialyzer is slow and not used by every project. Having the possibility of disabling it would be great.

mattbaker commented 9 months ago

The setting in question: https://elixir-lsp.github.io/elixir-ls/features/#dialyzer-integration

joetrimble commented 8 months ago

Don't have a direct answer, but I recently was able to turn on completions for the next-ls language server by adding this to my settings.json

"lsp": {
  "next-ls": {
    "initialization_options": {
      "experimental": {
        "completions": {
          "enable": true
        }
      }
    }
  }
}

Maybe for elixirLS you can experiment with something similar.

"lsp": {
  "elixir-ls": {
    "initialization_options": {
      ...
    }
  }
}
mattbaker commented 8 months ago

@joetrimble Yeah I was hoping that would work too! I've tried various permutations and none of them seemed to have any affect unfortunately, but it was a good idea

moomerman commented 8 months ago

I have a branch that implements LSP workspace configuration which works but isn't complete, I got stuck on some rust-specific stuff that I couldn't understand and chat CPT was no help at all!

https://github.com/moomerman/zed/tree/workspace-configuration

this allows you to add config like this in Zed's settings.json

  "lsp": {
    "elixir-ls": {
      "workspace_configuration": {
        "elixirLS": {
          "dialyzerEnabled": false
        }
      }
    }
  }
mattbaker commented 8 months ago

@moomerman I don’t know Rust but maybe you could open a PR and someone could help get it over the finish line? This is awesome!