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

Document Ability to "auto" format (format-on-save) #373

Open
briceburg opened this issue Dec 13, 2023 · 2 comments
Open

Document Ability to "auto" format (format-on-save) #373

briceburg opened this issue Dec 13, 2023 · 2 comments

Comments

@briceburg
Copy link

Is it possible to have the formatter (nixpkgs-fmt or language server) run automatically on file save? Is the documentation for it in the README?

@remus-selea
Copy link

remus-selea commented Mar 10, 2024

The code formatting does not work by default for me either. Maybe I came with the wrong expectations, but the description mentions "Adds nix language support for VSCode Editor."

I expected this to do the following:

  • add code highlighting for .nix files
  • add formatting on save

Instead, whenever I make a change to a file I get some errors:
image

What platforms are supported? This issue is on Windows.

@dudeofawesome
Copy link

You're probably looking for the following VS Code settings:

"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true,

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

No branches or pull requests

3 participants