82 lines
2.1 KiB
Nix
82 lines
2.1 KiB
Nix
{pkgs, ...}: {
|
|
programs.vscode = {
|
|
enable = true;
|
|
|
|
enableUpdateCheck = false;
|
|
enableExtensionUpdateCheck = false;
|
|
|
|
keybindings = [
|
|
{
|
|
key = "alt+a";
|
|
command = "editor.action.commentLine";
|
|
when = "editorTextFocus && !editorReadonly";
|
|
}
|
|
];
|
|
|
|
extensions = with pkgs.vscode-extensions; [
|
|
jnoortheen.nix-ide
|
|
arrterian.nix-env-selector
|
|
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
|
|
streetsidesoftware.code-spell-checker
|
|
];
|
|
|
|
userSettings = {
|
|
"git.enableCommitSigning" = true;
|
|
|
|
"window.menuBarVisibility" = "hidden";
|
|
"editor.fontFamily" = "'FiraCode Nerd Font'";
|
|
"editor.fontLigatures" = true;
|
|
"editor.minimap.enabled" = false;
|
|
|
|
"[nix]" = {
|
|
"editor.formatOnSave" = true;
|
|
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
|
|
};
|
|
|
|
"[python]" = {
|
|
"editor.formatOnSave" = true;
|
|
"editor.formatOnSaveMode" = "modificationsIfAvailable";
|
|
};
|
|
|
|
"[latex]" = {
|
|
"editor.formatOnSave" = true;
|
|
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
|
|
};
|
|
|
|
"[toml]" = {
|
|
"editor.formatOnSave" = true;
|
|
"editor.modificationsIfAvailable" = "file";
|
|
};
|
|
|
|
"python.formatting.autopep8Path" = "${pkgs.python311Packages.autopep8}/bin/autopep8";
|
|
|
|
"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";
|
|
};
|
|
};
|
|
}
|