home-manager/home/vscode.nix

64 lines
1.7 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-05 10:32:35 +00:00
github.copilot
2023-08-17 14:10:08 +00:00
davidanson.vscode-markdownlint
2023-08-17 18:38:46 +00:00
tamasfe.even-better-toml
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-17 18:38:46 +00:00
"[toml]" = {
"editor.formatOnSave" = true;
"editor.modificationsIfAvailable" = "file";
};
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";
"terminal.integrated.profiles.linux" = {
"bash" = {
"path" = "${pkgs.bashInteractive}/bin/bash";
"args" = [];
};
};
"terminal.integrated.defaultProfile.linux" = "bash";
2023-08-03 18:47:11 +00:00
};
2023-07-31 18:08:25 +00:00
}