2023-09-26 17:49:02 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
vscode-extensions,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
programs.vscode = rec {
|
2023-08-26 16:35:30 +00:00
|
|
|
enable = true;
|
|
|
|
|
2023-09-26 17:49:02 +00:00
|
|
|
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";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-09-26 17:49:02 +00:00
|
|
|
# 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
|
2023-10-15 12:44:31 +00:00
|
|
|
ms-python.autopep8
|
2023-08-26 16:35:30 +00:00
|
|
|
james-yu.latex-workshop
|
|
|
|
github.copilot
|
|
|
|
davidanson.vscode-markdownlint
|
|
|
|
tamasfe.even-better-toml
|
|
|
|
asciidoctor.asciidoctor-vscode
|
2023-09-26 18:06:18 +00:00
|
|
|
ziglang.vscode-zig
|
2023-09-30 17:02:04 +00:00
|
|
|
slevesque.shader
|
2023-10-15 13:05:56 +00:00
|
|
|
ms-vscode.cpptools
|
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-10-15 13:05:56 +00:00
|
|
|
|
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-10-15 13:05:56 +00:00
|
|
|
"extensions.ignoreRecommendations" = true;
|
|
|
|
|
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-10-15 12:44:31 +00:00
|
|
|
"editor.defaultFormatter" = "ms-python.autopep8";
|
2023-08-26 16:35:30 +00:00
|
|
|
};
|
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;
|
2023-10-15 12:44:31 +00:00
|
|
|
"editor.formatOnSaveMode" = "modificationsIfAvailable";
|
2023-08-26 16:35:30 +00:00
|
|
|
};
|
2023-09-04 21:56:05 +00:00
|
|
|
|
2023-10-15 13:05:56 +00:00
|
|
|
"[c]" = {
|
|
|
|
"editor.formatOnSave" = true;
|
|
|
|
"editor.formatOnSaveMode" = "modificationsIfAvailable";
|
|
|
|
};
|
|
|
|
|
|
|
|
"[cpp]" = {
|
|
|
|
"editor.formatOnSave" = true;
|
|
|
|
"editor.formatOnSaveMode" = "modificationsIfAvailable";
|
|
|
|
};
|
|
|
|
|
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-16 16:18:45 +00:00
|
|
|
|
2023-08-26 16:35:30 +00:00
|
|
|
"terminal.integrated.profiles.linux" = {
|
|
|
|
"bash" = {
|
|
|
|
"path" = "${pkgs.bashInteractive}/bin/bash";
|
|
|
|
"args" = [];
|
|
|
|
};
|
2023-08-16 16:18:45 +00:00
|
|
|
};
|
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";
|
2023-09-26 18:06:18 +00:00
|
|
|
|
|
|
|
"zig.zigPath" = ""; # Use the zig from the PATH
|
|
|
|
"zig.zls.path" = "${pkgs.unstable.zls}/bin/zls";
|
2023-10-15 13:05:56 +00:00
|
|
|
|
|
|
|
"C_Cpp.default.compilerPath" = "${pkgs.gnat11}/bin/g++";
|
|
|
|
"C_Cpp.default.includePath" = [
|
|
|
|
"\${workspaceFolder}/**"
|
|
|
|
];
|
2023-10-15 13:31:39 +00:00
|
|
|
"C_Cpp.clang_format_fallbackStyle" = "Microsoft";
|
2023-08-16 16:18:45 +00:00
|
|
|
};
|
2023-08-03 18:47:11 +00:00
|
|
|
};
|
2023-07-31 18:08:25 +00:00
|
|
|
}
|