Skip to content

Root .formatter.exs support for umbrella projects #34

@superhawk610

Description

@superhawk610

Describe the bug

I have an umbrella project with a single .formatter.exs at the root. When Dexter formats-on-save a file with Phoenix LiveView's attr macro, it changes this:

attr :name, :string

to this

attr(:name, :string)

To reproduce

Here's my file tree:

| mix.exs
| .formatter.exs
/ apps
  / app_web
    | mix.exs
    / lib
      | component.ex

Expected behavior

I'd expect the locals_without_parens (from import_deps) present in the root-level .formatter.exs to prevent that.

Debug logs

2026/04/15 11:21:48 Formatter: started persistent process for /apps/app_web/.formatter.exs (pid 29467)

Environment

  • Dexter version (dexter --version): 0.5.3
  • Elixir version (elixir --version): 1.19.5
  • Editor and version: Windsurf 1.110.1
  • OS: macOS Tahoe 26.4

It appears that when attempting to resolve the nearest .formatter.exs, traversal stops when a directory containing a mix.exs is reached. The expected file layout for running mix format for umbrella apps isn't super well-documented, but this setup (a single .formatter.exs at the umbrella root) seems at least somewhat common. When no nested config file exists under apps/{app}/.formatter.exs, I'd expect the LSP to fallback to the umbrella root's file instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions