ElixirLS - the Elixir Language Server

Have you tried connecting with observer to see what going on? You can pass name/sname/cookie via `ELS_ELIXIR_OPTS’

It looks like it might have been dialyzer building its PLT.

Actually, maybe not.

Here are some screen grabs from observer. There were some 30 processes with similar stack traces all with high reduction counts.

1 Like

@nhpip Please open an issue with repro. It seems the file you are editing is triggering some infinite loop or performance issue. All the stacktraces are from elixir_sense MetadataBuilder which ElixirLS uses to analyze AST

Will do

Version 0.20.0 has been released :rocket:

Highlights:

  • Selection ranges provider added. This provider handles expand/shrink selection editor commands in a semantic aware way

  • Completions, hover and signature help providers now are able to display @doc and other attributes data from the currently edited buffer

  • Hover provider now returns markdown with working links to hexdocs and erlang documentation. Support for ExDoc autolinking and erlang see tags has been added

See full release notes

ElixirLS elixir-ls/CHANGELOG.md at v0.20.0 · elixir-lsp/elixir-ls · GitHub
vscode extension vscode-elixir-ls/CHANGELOG.md at v0.20.0 · elixir-lsp/vscode-elixir-ls · GitHub

10 Likes

Do you think it would be possible to configure ElixirLS to format some attributes as comment text?

In VsCode the @moduledoc, @doc and @typedoc attributes have special formatting abilities, most importantly the text can be hard wrapped. Also the text is displayed in dull colors instead of the color for strings.

In our app, we have two layers of documentation for some modules: @moduledoc, which is what it generally is, and @myappdoc that is used to build another documentation static site, intended for users of the app (those modules are implementations of data pipeline transformers, so they export some metadata).

I would like to be able to display and hard wrap that custom attribute just like @moduledoc.

Is it something I can do by overriding some VsCode properties?

What do you mean by hard wrapped? If you mean folding ranges then it’s provided by the language server. The provider uses private elixir tokenizer API with special handling for doc attributes. You could fork it and extend to use your custom attributes. If you mean syntax highlighting then that is implemented as a textmate grammar. You could create your own grammar that highlights your attributes differently. Anyway, since those are very specific requirements I’d be against including that in ElixirLS

Yes hardwrapping: rearranging lines so the text block is contained in a width of 80 characters for instance. That means inserting and removing newlines to reshape the block. VsCodes does that with respect to markdown formatting (keeping bullet lists in their own line, etc.)

I know that would not be part of ElixirLS of course, but I wanted to known if there was somewhere I could plug my own logic, an extension point in ElixirLS.

Version 0.21.0 has been released :rocket:

Highlights:

  • OTP incremental dialyzer is now the default dialyzing engine on OTP 26+. While slower than ElixirLS dialyzer it is much better at tracking module dependencies and should resolve issues with transient dialyzer warning that do not disappear on recompile. ElixirLS dialyzer is still available and incremental dialyzer can be disabled by config setting elixirLS.incrementalDialyzer

  • Experimental support for Code actions added. Two code actions are available: Replace unknown remote def, replace an unused variable with an underscore

See full release notes

ElixirLS elixir-ls/CHANGELOG.md at v0.21.0 · elixir-lsp/elixir-ls · GitHub
vscode extension vscode-elixir-ls/CHANGELOG.md at v0.21.0 · elixir-lsp/vscode-elixir-ls · GitHub

16 Likes

Thanks for your work!

I tried other editors and extensions for Elixir, but this is the best.

Unfortunately, after upgrading to version 0.21.0 the vscode extension makes the computer unresponsive when using behaviours.

After I downgraded back to version 0.20.0, the vscode extension is usable again.
Seems others have the same issue.

v0.21.1 with fix for use problem has been released

10 Likes

Version 0.22.0 has been released :rocket:

Highlights:

  • Support for elixir 1.17 and new type system diagnostics
  • Support for OTP 27 including process labels in debug adapter

See full release notes

ElixirLS elixir-ls/CHANGELOG.md at v0.22.0 · elixir-lsp/elixir-ls · GitHub
vscode extension vscode-elixir-ls/CHANGELOG.md at v0.22.0 · elixir-lsp/vscode-elixir-ls · GitHub

9 Likes

I’ve been wondering why elixir-ls struggles at projects that have a lot of source files?

I currently work at a project that has in the ballpark 15k source files and elixir-ls just gets stuck, we have to resort to using lexical, which is also written in elixir.