Skip to content

[BUG] conform.nvim with format_on_save = { } does not generate corresponding setup arg #2601

Open
@dwf

Description

@dwf
Field Description
Plugin conform-nvim
Nixpkgs 24.11
  • I have read the FAQ and my bug is not listed there.

Description

After upgrading to nixpkgs and nixvim 24.11, I noticed conform was no longer formatting on save. The Conform augroup was completely missing. Looking at the generated init.lua, the format_on_save argument was indeed missing despite being not null in my config.

I suspect this is a "truthiness" check gone wrong, but there's a lot of indirection in the derivation and I wasn't able to figure it out. The workaround I've used is format_on_save = { quiet = false; } which restates the default, but actually successfully generates.

Minimal, Reproducible Example (MRE)

config.plugins.conform-nvim = {
  enable = true;
  settings = {
    formatters_by_ft = {
      nix = [ "nixfmt" ];
    };
    format_on_save = {};  # Should generate this argument to setup() verbatim
  };
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions