home-manager/systems/common/vscode.nix

148 lines
3.9 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
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
ziglang.vscode-zig
2023-09-30 17:02:04 +00:00
slevesque.shader
ms-vscode.cpptools
2023-12-06 16:30:01 +00:00
nvarner.typst-lsp
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
"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";
"editor.defaultFormatter" = "ms-python.autopep8";
2023-08-26 16:35:30 +00:00
};
2023-09-04 21:56:05 +00:00
2023-12-03 20:06:22 +00:00
"[javascript]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[typescript]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
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.formatOnSaveMode" = "modificationsIfAvailable";
2023-08-26 16:35:30 +00:00
};
2023-09-04 21:56:05 +00:00
"[c]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[cpp]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
2023-12-06 16:30:01 +00:00
"[typst]" = {
"editor.defaultFormatter" = "nvarner.typst-lsp";
"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-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";
2023-12-11 14:39:00 +00:00
"zig.path" = "${pkgs.zig}/bin/zig";
"zig.zigPath" = "${pkgs.zig}/bin/zig";
2023-12-06 16:30:01 +00:00
# "zig.zls.zigLibPath" = "${pkgs.unstable.zig}/lib/zig";
2023-12-11 14:39:00 +00:00
"zig.zls.path" = "${pkgs.zls}/bin/zls";
"zig.initialSetupDone" = true;
2023-12-06 16:30:01 +00:00
"typst-lsp.serverPath" = "${pkgs.typst-lsp}/bin/typst-lsp";
"typst-lsp.experimentalFormatterMode" = "on";
2023-12-03 20:06:22 +00:00
"C_Cpp.default.compilerPath" = "${pkgs.gnat}/bin/g++";
"C_Cpp.default.includePath" = [
"\${workspaceFolder}/**"
];
2023-10-15 13:31:39 +00:00
"C_Cpp.clang_format_fallbackStyle" = "Microsoft";
"github.copilot.enable" = {
"*" = true;
plaintext = false;
markdown = false;
scminput = false;
cpp = false;
};
};
2023-08-03 18:47:11 +00:00
};
2023-07-31 18:08:25 +00:00
}