configure vscode nix formatting

This commit is contained in:
Vinzenz Schroeter 2025-05-18 11:03:25 +02:00
parent 889bff482c
commit b6ad841847
2 changed files with 113 additions and 96 deletions

View file

@ -1,13 +1,14 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
{
config.programs.vscode = {
config = {
home.sessionVariables.NIXOS_OZONE_WL = "1";
programs.vscode = {
enable = true;
package = pkgs.vscodium;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
jnoortheen.nix-ide
ms-python.python
kamadorueda.alejandra
editorconfig.editorconfig
yzhang.markdown-all-in-one
redhat.vscode-yaml
@ -49,10 +50,17 @@
"markdown.extension.toc.orderedList" = false;
"rust-analyzer.checkOnSave.command" = "clippy";
"nix.formatterPath" = "${lib.getBin pkgs.nixfmt-rfc-style}/bin/nixfmt";
"\[makefile\]" = {
"editor.insertSpaces" = false;
"editor.detectIndentation" = false;
};
"\[nix\]" = {
"editor.formatOnSave" = false;
};
};
};
};
}

View file

@ -1,13 +1,14 @@
{ pkgs, lib, ... }:
{
config.programs.vscode = {
config = {
home.sessionVariables.NIXOS_OZONE_WL = "1";
programs.vscode = {
enable = true;
package = pkgs.vscodium;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
jnoortheen.nix-ide
ms-python.python
kamadorueda.alejandra
editorconfig.editorconfig
yzhang.markdown-all-in-one
redhat.vscode-yaml
@ -50,12 +51,20 @@
"explorer.excludeGitIgnore" = false;
"markdown.extension.tableFormatter.normalizeIndentation" = true;
"markdown.extension.toc.orderedList" = false;
"rust-analyzer.checkOnSave.command" = "clippy";
"nix.formatterPath" = "${lib.getBin pkgs.nixfmt-rfc-style}/bin/nixfmt";
"\[makefile\]" = {
"editor.insertSpaces" = false;
"editor.detectIndentation" = false;
};
"\[nix\]" = {
"editor.formatOnSave" = false;
};
};
};
};
}