flake/home/applications/vscode/default.nix

95 lines
3 KiB
Nix
Raw Normal View History

2023-11-05 09:21:37 +00:00
{
lib,
pkgs,
config,
2023-11-05 09:21:37 +00:00
...
}: {
programs.vscode = lib.mkMerge [
{
enable = true;
2023-12-11 12:26:18 +00:00
package = pkgs.vscodium.override {
commandLineArgs = ''--password-store="gnome"'';
};
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
keybindings = [
{
key = "tab";
command = "selectNextSuggestion";
when = "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion";
}
{
key = "shift+tab";
command = "selectPrevSuggestion";
when = "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion";
}
];
userSettings = {
diffEditor.ignoreTrimWhitespace = false;
editor.cursorBlinking = "smooth";
editor.cursorSmoothCaretAnimation = "on";
editor.fontFamily = lib.mkDefault "Monospace";
editor.fontWeight = 600;
2024-01-03 21:01:55 +00:00
editor.lineNumbers = "relative";
editor.smoothScrolling = true;
editor.tabSize = 2;
explorer.confirmDragAndDrop = false;
explorer.confirmDelete = false;
files.autoSave = "onFocusChange";
files.trimTrailingWhitespace = true;
files.trimFinalNewlines = true;
security.workspace.trust.enabled = false;
telemetry.telemetryLevel = "off";
terminal.integrated.cursorStyle = "line";
terminal.integrated.smoothScrolling = true;
window.menuBarVisibility = "toggle";
workbench.list.smoothScrolling = true;
2023-11-17 12:00:28 +00:00
# Workaround for VSCode crashing
# https://github.com/microsoft/vscode/issues/184124
window.titleBarStyle = "custom";
workbench.layoutControl.enabled = false;
window.commandCenter = false;
2023-11-05 09:21:37 +00:00
# Language specific
### Nix
"[nix]".editor.tabSize = 2;
# Extensions
### GitLens
2023-12-10 16:41:55 +00:00
gitlens.showWelcomeOnInstall = false;
gitlens.showWhatsNewAfterUpgrades = false;
gitlens.plusFeatures.enabled = false;
gitlens.telemetry.enabled = false;
2024-01-18 08:21:51 +00:00
### Material icons
workbench.iconTheme = "material-icon-theme";
workbench.productIconTheme = "material-product-icons";
};
extensions = with pkgs.vscode-extensions; [
### QoL
eamodio.gitlens
esbenp.prettier-vscode
ritwickdey.liveserver
vscodevim.vim
2024-01-17 11:51:12 +00:00
editorconfig.editorconfig
### Markup formats
redhat.vscode-yaml
redhat.vscode-xml
tamasfe.even-better-toml
#bungcip.better-toml
2024-01-18 08:21:51 +00:00
### Material icons
pkief.material-icon-theme
pkief.material-product-icons
];
}
2023-11-05 09:21:37 +00:00
(lib.mkIf (config.myFlake.home-manager.colorScheme == "tokyonight") {
extensions = [pkgs.vscode-extensions.enkia.tokyo-night];
userSettings.workbench.colorTheme = "Tokyo Night";
})
];
2023-11-05 09:21:37 +00:00
}