home-manager/systems/common/vscode.nix
Kristian Krsnik 489e53b3ca
Updated Flake
* Replaced VSCode with VSCodium
* Added own Overlays
* Added PrismLauncher
2024-02-06 13:23:36 +01:00

143 lines
3.8 KiB
Nix

{pkgs, ...}: {
programs.bash = {
shellAliases = {
code = "codium"; # Alias VSCode with VSCodium
};
};
programs.vscode = {
enable = true;
package = pkgs.vscodium; # Replace VSCode with VSCodium
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 pkgs.vscode-marketplace; [
jnoortheen.nix-ide
mkhl.direnv
ms-python.python
ms-python.vscode-pylance
ms-python.autopep8
james-yu.latex-workshop
davidanson.vscode-markdownlint
tamasfe.even-better-toml
asciidoctor.asciidoctor-vscode
ziglang.vscode-zig
slevesque.shader
ms-vscode.cpptools
nvarner.typst-lsp
redhat.java
streetsidesoftware.code-spell-checker
streetsidesoftware.code-spell-checker-german
];
userSettings = {
"git.enableCommitSigning" = true;
"window.menuBarVisibility" = "toggle";
"editor.fontFamily" = "'FiraCode Nerd Font'";
"editor.fontLigatures" = true;
"editor.minimap.enabled" = false;
"extensions.ignoreRecommendations" = true;
"[nix]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
};
"[python]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
"editor.defaultFormatter" = "ms-python.autopep8";
};
"[javascript]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[typescript]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[latex]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
};
"[toml]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[c]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[cpp]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[typst]" = {
"editor.defaultFormatter" = "nvarner.typst-lsp";
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nil}/bin/nil";
"nix.serverSettings" = {
nil = {
formatting = {command = ["${pkgs.alejandra}/bin/alejandra"];};
};
};
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
"latex-workshop.latex.outDir" = "%DIR%/out";
"terminal.integrated.profiles.linux" = {
"bash" = {
"path" = "${pkgs.bashInteractive}/bin/bash";
"args" = [];
};
};
"terminal.integrated.defaultProfile.linux" = "bash";
"cSpell.language" = "en,de-de";
"zig.path" = "";
"zig.zls.path" = "";
"zig.initialSetupDone" = true;
"typst-lsp.serverPath" = "${pkgs.typst-lsp}/bin/typst-lsp";
"typst-lsp.experimentalFormatterMode" = "on";
"C_Cpp.default.compilerPath" = "${pkgs.gnat}/bin/g++";
"C_Cpp.default.includePath" = [
"\${workspaceFolder}/**"
];
"C_Cpp.clang_format_fallbackStyle" = "Microsoft";
"redhat.telemetry.enabled" = false;
"java.jdt.ls.java.home" = "${pkgs.jdk21_headless}";
};
};
}