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

No auto-formatting with `nix-ts-mode' #298

Open
ZharMeny opened this issue Apr 25, 2024 · 1 comment · May be fixed by #300
Open

No auto-formatting with `nix-ts-mode' #298

ZharMeny opened this issue Apr 25, 2024 · 1 comment · May be fixed by #300

Comments

@ZharMeny
Copy link

With apheleia-global-mode enabled, nixfmt isn't run automatically on save when using nix-ts-mode instead of nix-mode, as nix-ts-mode doesn't derive from nix-mode and is not in the default apheleia-mode-alist.

ZharMeny added a commit to ZharMeny/apheleia that referenced this issue Apr 29, 2024
@ZharMeny ZharMeny linked a pull request Apr 29, 2024 that will close this issue
@peterhoeg
Copy link

Until the mentioned PR is merged and if you someone is using doom emacs, the following can be used as a workaround:

    (set-formatter! 'nixpkgs-fmt '("nixpkgs-fmt") :modes '(nix-mode nix-ts-mode))

If you're not using doom, you can of course just manipulate apheleia-formatters directly.

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

Successfully merging a pull request may close this issue.

2 participants