mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
complete rework v3
This commit is contained in:
parent
7409e9ca10
commit
366a0e221a
131 changed files with 20171 additions and 585 deletions
81
parts/modules/apps/vscode.nix
Normal file
81
parts/modules/apps/vscode.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
pkgsUnstable,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
# stable = inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace-release;
|
||||
vscode-extensions = inputs.nix-vscode-extensions.extensions.${pkgs.system};
|
||||
vscodePackage = pkgsUnstable.vscode;
|
||||
vscodeMarketplace = (vscode-extensions.forVSCodeVersion vscodePackage.version).vscode-marketplace;
|
||||
vscodeMarketplaceRelease = (vscode-extensions.forVSCodeVersion vscodePackage.version).vscode-marketplace-release;
|
||||
vscodePkgs = vscodeMarketplace // vscodeMarketplaceRelease; # Prefer release over pre-release
|
||||
|
||||
mkFormatter = formatter: languages: {
|
||||
"[${lib.concatStringsSep "][" languages}]" = {
|
||||
editor.defaultFormatter = formatter;
|
||||
editor.formatOnSave = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
fireproof.home-manager = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = vscodePackage;
|
||||
enableUpdateCheck = true;
|
||||
enableExtensionUpdateCheck = true;
|
||||
userSettings = lib.mkMerge [
|
||||
{
|
||||
# General
|
||||
extensions.ignoreRecommendations = true;
|
||||
|
||||
# Remote
|
||||
remote.SSH.useLocalServer = false;
|
||||
|
||||
# AI
|
||||
github.copilot.editor.enableAutoCompletions = true;
|
||||
github.copilot.enable."*" = true;
|
||||
|
||||
# Theme
|
||||
workbench.colorTheme = "Darcula Theme from IntelliJ";
|
||||
|
||||
# Keybindings
|
||||
workbench.commandPalette.experimental.suggestCommands = true; # Emulates IntelliJ's "Search Everywhere"
|
||||
}
|
||||
(mkFormatter "esbenp.prettier-vscode" ["json" "jsonc" "markdown" "css" "scss" "typescript" "typescriptreact" "html" "yaml"])
|
||||
(mkFormatter "charliermarsh.ruff" ["python"])
|
||||
];
|
||||
extensions = with vscodePkgs; [
|
||||
# Remote
|
||||
ms-vscode-remote.remote-ssh
|
||||
|
||||
# AI
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
|
||||
# Python
|
||||
ms-pyright.pyright
|
||||
ms-python.python
|
||||
charliermarsh.ruff
|
||||
|
||||
# JavaScript
|
||||
dbaeumer.vscode-eslint
|
||||
esbenp.prettier-vscode
|
||||
|
||||
# Nix
|
||||
jnoortheen.nix-ide
|
||||
|
||||
# Other languages
|
||||
nefrob.vscode-just-syntax
|
||||
redhat.vscode-yaml
|
||||
|
||||
# Theme
|
||||
trinm1709.dracula-theme-from-intellij
|
||||
|
||||
# Keybindings
|
||||
k--kato.intellij-idea-keybindings
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue