home-manager/home/vscode.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

2023-08-02 14:29:58 +00:00
{
enable,
pkgs,
}: {
2023-07-31 18:08:25 +00:00
inherit enable;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
2023-07-31 18:08:25 +00:00
keybindings = [
{
key = "alt+a";
command = "editor.action.commentLine";
when = "editorTextFocus && !editorReadonly";
}
];
2023-08-02 14:29:58 +00:00
extensions = with pkgs.vscode-extensions; [
2023-08-02 14:32:31 +00:00
jnoortheen.nix-ide
2023-08-03 18:47:11 +00:00
arrterian.nix-env-selector
mkhl.direnv
2023-08-02 14:48:53 +00:00
ms-python.python
2023-08-03 10:58:00 +00:00
ms-python.vscode-pylance
james-yu.latex-workshop
2023-08-02 14:29:58 +00:00
];
2023-08-03 18:47:11 +00:00
userSettings = {
"window.menuBarVisibility" = "hidden";
2023-08-03 19:38:04 +00:00
"[nix]" = {
"editor.formatOnSave" = true;
2023-08-04 12:55:22 +00:00
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
2023-08-03 19:38:04 +00:00
};
"[python]" = {
"editor.formatOnSave" = true;
2023-08-04 12:55:22 +00:00
"editor.formatOnSaveMode" = "modificationsIfAvailable";
2023-08-03 19:38:04 +00:00
};
2023-08-03 20:49:47 +00:00
"[latex]" = {
"editor.formatOnSave" = true;
2023-08-04 12:55:22 +00:00
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
2023-08-03 20:49:47 +00:00
};
2023-08-03 19:38:04 +00:00
"python.formatting.autopep8Path" = "${pkgs.python311Packages.autopep8}/bin/autopep8";
2023-08-03 18:47:11 +00:00
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nil}/bin/nil";
"nix.serverSettings" = {
nil = {
2023-08-03 19:38:14 +00:00
formatting = {command = ["${pkgs.alejandra}/bin/alejandra"];};
2023-08-03 18:47:11 +00:00
};
};
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
"latex-workshop.latex.outDir" = "%DIR%/out";
};
2023-07-31 18:08:25 +00:00
}