Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add treefmt_nix to builtins #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lassulus
Copy link

@Lassulus Lassulus commented Oct 2, 2024

depends on numtide/treefmt-nix#243

not sure if there is a policy before creating a builtin. but I didn't want to break usage with the treefmt plugin. treefmt-nix allows configuring treefmt with nix and there is an optional wrapper that can be included in a devshell. this builtin is expected to be used together with devenv and the treefmt-nix wrapper inside the devshell.

@Mic92 maybe has some feedback on this approach :)

@mochaaP
Copy link
Member

mochaaP commented Oct 3, 2024

Is it possible for you to use .with() for this? Some integration might detect the diagnostics source and this will break them with this approach.

@jfly
Copy link

jfly commented Oct 5, 2024

I'm excited about this! But the direction smells a little off to me: there's already a treefmt entrypoint with the config embedded, it's nix fmt.

IMO, we should instead be adding a generic "run nix fmt" builtin for none-ls. I've been working on that in this none-ls fork: main...jfly:none-ls.nvim:add-nix-fmt, but it requires a change to how treefmt's --walk=auto behaves so it'll be willing to format gitignored files passed explicitly on the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants