2024-03-17 19:18:53 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
2024-06-11 07:36:07 +02:00
|
|
|
lib,
|
2024-03-17 19:18:53 +01:00
|
|
|
inputs,
|
|
|
|
config,
|
|
|
|
system,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
programs.vscode = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.vscodium;
|
2024-10-27 01:16:55 +02:00
|
|
|
mutableExtensionsDir = true;
|
2024-03-17 19:18:53 +01:00
|
|
|
extensions =
|
|
|
|
with pkgs.vscode-extensions;
|
|
|
|
[
|
|
|
|
ms-python.python
|
|
|
|
vscodevim.vim
|
|
|
|
yzhang.markdown-all-in-one
|
|
|
|
bungcip.better-toml
|
|
|
|
eamodio.gitlens
|
|
|
|
jnoortheen.nix-ide
|
|
|
|
mkhl.direnv
|
2024-10-04 21:14:11 +02:00
|
|
|
editorconfig.editorconfig
|
2024-03-17 19:18:53 +01:00
|
|
|
]
|
|
|
|
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
|
|
|
{
|
|
|
|
name = "Sync-Rsync";
|
|
|
|
publisher = "vscode-ext";
|
|
|
|
version = "0.36.0";
|
|
|
|
sha256 = "sha256-0b/OHLZfXo0NAVAVkzZSqMGDzF0uvPRoiqsZtW1iOdA";
|
|
|
|
}
|
|
|
|
# TODO: probably available in nixpkgs soonish?
|
|
|
|
{
|
|
|
|
name = "mypy-type-checker";
|
|
|
|
publisher = "ms-python";
|
|
|
|
version = "2023.3.12681020";
|
|
|
|
sha256 = "sha256-rhed7CQlvxksVCGc9nPU2oYQWtXcAV5TzuG63e8Y3zM=";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "black-formatter";
|
|
|
|
publisher = "ms-python";
|
|
|
|
version = "2023.5.12771008";
|
|
|
|
sha256 = "sha256-lJG0RRUUMhQGs2a6oBtoqt+uY1kSJ0+cbmaP07hNh2o=";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "vscode-pets";
|
|
|
|
publisher = "tonybaloney";
|
|
|
|
version = "1.25.1";
|
|
|
|
sha256 = "sha256-as3e2LzKBSsiGs/UGIZ06XqbLh37irDUaCzslqITEJQ=";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
userSettings =
|
|
|
|
let
|
|
|
|
defaultPython = pkgs.python3.withPackages (ps: [
|
|
|
|
ps.jedi
|
|
|
|
ps.jedi-language-server
|
|
|
|
ps.pip
|
|
|
|
ps.setuptools # for pkg_resources
|
|
|
|
ps.black
|
|
|
|
ps.mypy
|
|
|
|
]);
|
|
|
|
in
|
|
|
|
{
|
|
|
|
"editor.fontLigatures" = true;
|
2024-04-04 01:32:49 +02:00
|
|
|
"editor.accessibilitySupport" = false; # prevent asking
|
2024-03-26 16:44:51 +01:00
|
|
|
"editor.cursorBlinking" = "phase";
|
2024-04-04 14:29:18 +02:00
|
|
|
"editor.stickyScroll.enabled" = true;
|
2024-03-26 16:44:51 +01:00
|
|
|
"workbench.editor.highlightModifiedTabs" = true;
|
2024-03-17 19:18:53 +01:00
|
|
|
"window.autoDetectColorScheme" = true;
|
|
|
|
"workbench.preferredDarkColorTheme" = "Default Dark Modern";
|
|
|
|
"workbench.preferredLightColorTheme" = "Default Light Modern";
|
|
|
|
"[nix]" = {
|
|
|
|
"editor.insertSpaces" = true;
|
|
|
|
"editor.tabSize" = 2;
|
|
|
|
# for now, disable automatic formatting to prevent disruption of existing code bases
|
|
|
|
"editor.formatOnPaste" = false;
|
|
|
|
"editor.formatOnSave" = false;
|
|
|
|
"editor.formatOnType" = false;
|
|
|
|
};
|
2024-11-15 01:19:59 +01:00
|
|
|
"nix.formatterPath" = lib.getExe pkgs.nixfmt;
|
2024-07-08 16:09:26 +02:00
|
|
|
"nix.enableLanguageServer" = true;
|
|
|
|
"nix.serverPath" = lib.getExe pkgs.nixd;
|
|
|
|
"nix.serverSettings" = { };
|
2024-03-17 19:18:53 +01:00
|
|
|
"editor.fontSize" = 13;
|
|
|
|
"editor.fontWeight" = "normal";
|
|
|
|
"git.detectSubmodulesLimit" = 30;
|
|
|
|
"[python]" = {
|
|
|
|
"breadcrumbs.showClasses" = true;
|
|
|
|
"breadcrumbs.showFunctions" = true;
|
|
|
|
"gitlens.codeLens.symbolScopes" = [ "!Module" ];
|
|
|
|
"editor.defaultFormatter" = "ms-python.black-formatter";
|
|
|
|
"editor.formatOnSave" = true;
|
|
|
|
};
|
|
|
|
"python.languageServer" = "Jedi"; # don't use proprietary pylance server
|
|
|
|
"python.defaultInterpreterPath" = "${defaultPython}/bin/python";
|
|
|
|
"black-formatter.path" = [ "${pkgs.python3Packages.black}/bin/black" ];
|
|
|
|
"black-formatter.importStrategy" = "fromEnvironment";
|
|
|
|
"mypy-type-checker.path" = [ "${pkgs.python3Packages.mypy}/bin/mypy" ];
|
|
|
|
"mypy-type-checker.importStrategy" = "fromEnvironment";
|
|
|
|
"mypy-type-checker.args" = [ "--ignore-missing-imports" ];
|
|
|
|
"gitlens.telemetry.enabled" = false;
|
|
|
|
"vim.highlightedyank.enable" = true;
|
|
|
|
"vim.history" = 500;
|
|
|
|
"vim.neovimUseConfigFile" = true;
|
|
|
|
"vim.enableNeovim" = true;
|
|
|
|
"git.suggestSmartCommit" = false;
|
|
|
|
"editor.rulers" = [ 79 ];
|
|
|
|
"vim.useSystemClipboard" = true;
|
|
|
|
"vim.smartRelativeLine" = true;
|
|
|
|
"diffEditor.ignoreTrimWhitespace" = false;
|
|
|
|
"files.associations" = {
|
|
|
|
"*.py" = "python";
|
|
|
|
};
|
|
|
|
"editor.renderWhitespace" = "all";
|
|
|
|
"editor.fontFamily" = "Iosevka Curly Slab, Menlo, Monaco, 'Courier New', monospace";
|
2024-07-08 16:08:41 +02:00
|
|
|
"vim.neovimPath" = lib.getExe pkgs.myVim;
|
2024-03-17 19:18:53 +01:00
|
|
|
"sync-rsync.options" = [ ];
|
2024-08-21 10:28:27 +02:00
|
|
|
"direnv.path.executable" = lib.getExe pkgs.direnv;
|
2024-03-17 19:18:53 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|