146 lines
3.8 KiB
Nix
146 lines
3.8 KiB
Nix
{
|
|
pkgs,
|
|
vscode-extensions,
|
|
...
|
|
}: {
|
|
programs.vscode = rec {
|
|
enable = true;
|
|
|
|
package = pkgs.unstable.vscode; # To use the latest unstable vscode
|
|
|
|
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; [
|
|
jnoortheen.nix-ide
|
|
mkhl.direnv
|
|
ms-python.python
|
|
ms-python.vscode-pylance
|
|
ms-python.autopep8
|
|
james-yu.latex-workshop
|
|
github.copilot
|
|
davidanson.vscode-markdownlint
|
|
tamasfe.even-better-toml
|
|
asciidoctor.asciidoctor-vscode
|
|
ziglang.vscode-zig
|
|
slevesque.shader
|
|
ms-vscode.cpptools
|
|
nvarner.typst-lsp
|
|
|
|
streetsidesoftware.code-spell-checker
|
|
streetsidesoftware.code-spell-checker-german
|
|
];
|
|
|
|
userSettings = {
|
|
"git.enableCommitSigning" = true;
|
|
|
|
"window.menuBarVisibility" = "hidden";
|
|
|
|
"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";
|
|
|
|
"github.copilot.enable" = {
|
|
"*" = true;
|
|
plaintext = false;
|
|
markdown = false;
|
|
scminput = false;
|
|
cpp = false;
|
|
};
|
|
};
|
|
};
|
|
}
|