Skip to content

~H sigils no longer formatted after updating to Elixir 1.15.5 #975

@balexand

Description

@balexand

Environment

  • Elixir & Erlang versions (elixir --version): Elixir 1.15.5, OTP 26.0.2
  • Elixir Language Server version: 0.16.0
  • Operating system: Mac OS (Intel, latest)
  • Editor or IDE name (e.g. Emacs/VSCode): VSCode
  • Editor Plugin/LSP Client name and version: jakebecker.elixir-ls 0.16.0

Current behavior

After updating to Elixir 1.15.5 ~H sigils are no longer formatted by the VSCode ElixirLS plugin. To reproduce, generate a new Phoenix project with mix phx.new example. The generated ExampleWeb.CoreComponents module contains ~H sigils that can be used for testing and the generated .formatter.exs file includes plugins: [Phoenix.LiveView.HTMLFormatter]. Running mix format from the command line will result in the ~H sigils being formatted. But if the formatter is run by ElixirLS then the Elixir code is formatted but not the ~H sigils.

Downgrading to Elixir 1.15.4 fixes the problem.

Expected behavior

I would expect ~H sigils to be formatted by ElixirLS as it was prior to Elixir version 1.15.5.

Thanks.

Activity

lukaszsamson

lukaszsamson commented on Aug 30, 2023

@lukaszsamson
Collaborator

Thanks for the report. There were formatter plugin related changes in 1.15.5. I will investigate

champeric

champeric commented on Sep 6, 2023

@champeric

I just want to chime in that I have the exact same problem with the same environment.

stevencorona

stevencorona commented on Sep 6, 2023

@stevencorona

I've had the same issue but specifically within an umbrella project - @lukaszsamson @champeric are you both working in umbrella projects as well?

It also seems to work sporatically, almost like it's using the wrong .formatter.exs configuration for the wrong project app.

lukaszsamson

lukaszsamson commented on Sep 14, 2023

@lukaszsamson
Collaborator

Thanks for reporting. This is a regression in elixir 1.15.5

lukaszsamson

lukaszsamson commented on Sep 14, 2023

@lukaszsamson
Collaborator

Already fixed upstream and backported to 1.15 branch. 1.16 and 1.15.6 releases should not be affected by this bug

balexand

balexand commented on Sep 15, 2023

@balexand
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @stevencorona@balexand@lukaszsamson@champeric

        Issue actions

          ~H sigils no longer formatted after updating to Elixir 1.15.5 · Issue #975 · elixir-lsp/elixir-ls