home-manager/modules/vscode.nix

82 lines
2.1 KiB
Nix
Raw Normal View History

2023-08-26 16:35:30 +00:00
{pkgs, ...}: {
config.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
2023-09-13 19:55:05 +00:00
streetsidesoftware.code-spell-checker
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
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-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;
"editor.modificationsIfAvailable" = "file";
};
2023-09-04 21:56:05 +00:00
2023-08-26 16:35:30 +00:00
"python.formatting.autopep8Path" = "${pkgs.python311Packages.autopep8}/bin/autopep8";
2023-09-04 21:56:05 +00:00
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-08-03 18:47:11 +00:00
};
2023-07-31 18:08:25 +00:00
}