home-manager/systems/common/vscode.nix

96 lines
2.5 KiB
Nix
Raw Normal View History

{
pkgs,
vscode-extensions,
...
}: {
programs.vscode = rec {
2023-08-26 16:35:30 +00:00
enable = true;
package = pkgs.unstable.vscode; # To use the latest unstable vscode
2023-08-26 16:35:30 +00:00
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
keybindings = [
{
key = "alt+a";
command = "editor.action.commentLine";
when = "editorTextFocus && !editorReadonly";
}
];
# This will only yield extensions that are compatible with the installed version of vscode
extensions = with (vscode-extensions.forVSCodeVersion package.version).vscode-marketplace; [
2023-08-26 16:35:30 +00:00
jnoortheen.nix-ide
mkhl.direnv
ms-python.python
ms-python.vscode-pylance
james-yu.latex-workshop
github.copilot
davidanson.vscode-markdownlint
tamasfe.even-better-toml
asciidoctor.asciidoctor-vscode
ziglang.vscode-zig
2023-09-26 17:54:28 +00:00
2023-09-13 19:55:05 +00:00
streetsidesoftware.code-spell-checker
2023-09-26 17:54:28 +00:00
streetsidesoftware.code-spell-checker-german
2023-08-26 16:35:30 +00:00
];
userSettings = {
2023-09-04 21:53:54 +00:00
"git.enableCommitSigning" = true;
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"window.menuBarVisibility" = "hidden";
2023-09-04 21:56:05 +00:00
"editor.fontFamily" = "'FiraCode Nerd Font'";
"editor.fontLigatures" = true;
2023-09-05 17:56:19 +00:00
"editor.minimap.enabled" = false;
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"[nix]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
2023-08-03 18:47:11 +00:00
};
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"[python]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"[latex]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
};
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"[toml]" = {
"editor.formatOnSave" = true;
"editor.modificationsIfAvailable" = "file";
};
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"python.formatting.autopep8Path" = "${pkgs.python311Packages.autopep8}/bin/autopep8";
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nil}/bin/nil";
"nix.serverSettings" = {
nil = {
formatting = {command = ["${pkgs.alejandra}/bin/alejandra"];};
};
};
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"latex-workshop.latex.outDir" = "%DIR%/out";
2023-08-26 16:35:30 +00:00
"terminal.integrated.profiles.linux" = {
"bash" = {
"path" = "${pkgs.bashInteractive}/bin/bash";
"args" = [];
};
};
2023-08-26 16:35:30 +00:00
"terminal.integrated.defaultProfile.linux" = "bash";
2023-09-26 17:54:28 +00:00
"cSpell.language" = "en,de-de";
"zig.zigPath" = ""; # Use the zig from the PATH
"zig.zls.path" = "${pkgs.unstable.zls}/bin/zls";
};
2023-08-03 18:47:11 +00:00
};
2023-07-31 18:08:25 +00:00
}