2023-11-05 17:56:55 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
{
|
2023-11-05 11:40:44 +01:00
|
|
|
programs.vscode = {
|
|
|
|
|
enable = true;
|
2023-11-09 23:17:29 +01:00
|
|
|
package = pkgs.vscodium;
|
2023-11-08 20:38:46 +01:00
|
|
|
extensions = with pkgs.vscode-extensions; [
|
2023-12-06 19:08:02 +01:00
|
|
|
# nix language
|
2023-11-08 20:38:46 +01:00
|
|
|
bbenoist.nix
|
2024-01-02 15:55:22 +01:00
|
|
|
# nix-shell suport
|
|
|
|
|
arrterian.nix-env-selector
|
2023-12-06 19:08:02 +01:00
|
|
|
# python
|
2023-12-01 19:06:23 +01:00
|
|
|
ms-python.python
|
2023-12-23 20:21:23 +01:00
|
|
|
# C/C++
|
|
|
|
|
ms-vscode.cpptools
|
2024-02-12 23:48:34 +01:00
|
|
|
# OCaml
|
|
|
|
|
ocamllabs.ocaml-platform
|
2023-12-06 19:08:02 +01:00
|
|
|
|
|
|
|
|
# Color theme
|
2023-11-09 23:11:13 +01:00
|
|
|
catppuccin.catppuccin-vsc
|
2023-11-09 23:11:32 +01:00
|
|
|
catppuccin.catppuccin-vsc-icons
|
2023-11-05 11:40:44 +01:00
|
|
|
];
|
2023-11-08 20:38:46 +01:00
|
|
|
userSettings = {
|
|
|
|
|
"update.mode" = "none";
|
|
|
|
|
"extensions.autoUpdate" = false; # This stuff fixes vscode freaking out when theres an update
|
2023-12-06 18:53:50 +01:00
|
|
|
"window.titleBarStyle" = "custom"; # needed otherwise vscode crashes, see https://github.com/NixOS/nixpkgs/issues/246509
|
2023-11-08 20:38:46 +01:00
|
|
|
|
|
|
|
|
"window.menuBarVisibility" = "toggle";
|
|
|
|
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'SymbolsNerdFont', 'monospace', monospace";
|
|
|
|
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font', 'SymbolsNerdFont'";
|
2023-12-06 18:58:55 +01:00
|
|
|
"editor.fontSize" = 16;
|
2023-11-08 20:38:46 +01:00
|
|
|
"workbench.colorTheme" = "Catppuccin Mocha";
|
2023-11-09 23:17:29 +01:00
|
|
|
"workbench.iconTheme" = "catppuccin-mocha";
|
2023-11-09 23:11:13 +01:00
|
|
|
"vsicons.dontShowNewVersionMessage" = true;
|
2023-12-14 16:03:52 +01:00
|
|
|
"explorer.confirmDragAndDrop" = false;
|
2023-11-08 20:38:46 +01:00
|
|
|
"editor.fontLigatures" = true;
|
|
|
|
|
"editor.minimap.enabled" = false;
|
2023-12-07 16:03:09 +01:00
|
|
|
"workbench.startupEditor" = "none";
|
2023-11-08 20:38:46 +01:00
|
|
|
|
2023-12-23 22:37:45 +01:00
|
|
|
"editor.formatOnType" = true;
|
|
|
|
|
|
2023-12-07 16:03:09 +01:00
|
|
|
"workbench.layoutControl.type" = "menu";
|
2023-12-07 16:31:20 +01:00
|
|
|
"workbench.editor.limit.enabled" = true;
|
|
|
|
|
"workbench.editor.limit.value" = 5;
|
2023-12-07 16:03:09 +01:00
|
|
|
"workbench.editor.limit.perEditorGroup" = true;
|
2023-12-07 22:25:15 +01:00
|
|
|
"workbench.editor.showTabs" = "single";
|
2023-12-07 16:03:09 +01:00
|
|
|
"files.autoSave" = "onWindowChange";
|
|
|
|
|
"explorer.openEditors.visible" = 0;
|
|
|
|
|
"breadcrumbs.enabled" = false;
|
|
|
|
|
"editor.renderControlCharacters" = false;
|
2023-12-07 16:09:21 +01:00
|
|
|
"workbench.activityBar.location" = "hidden";
|
2023-12-07 16:03:09 +01:00
|
|
|
"workbench.statusBar.visible" = false;
|
|
|
|
|
"editor.scrollbar.verticalScrollbarSize" = 2;
|
|
|
|
|
"editor.scrollbar.horizontalScrollbarSize" = 2;
|
|
|
|
|
"editor.scrollbar.vertical" = "hidden";
|
|
|
|
|
"editor.scrollbar.horizontal" = "hidden";
|
2023-12-07 16:04:38 +01:00
|
|
|
"workbench.layoutControl.enabled" = false;
|
2023-12-06 18:53:50 +01:00
|
|
|
|
|
|
|
|
"editor.mouseWheelZoom" = true;
|
2023-12-23 22:17:21 +01:00
|
|
|
|
|
|
|
|
"C_Cpp.autocompleteAddParentheses" = true;
|
2023-12-23 22:29:56 +01:00
|
|
|
"C_Cpp.formatting" = "vcFormat";
|
2024-03-28 08:45:23 +01:00
|
|
|
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyFunction" = true;
|
|
|
|
|
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType" = true;
|
|
|
|
|
"C_Cpp.vcFormat.space.beforeEmptySquareBrackets" = true;
|
2023-12-23 22:17:21 +01:00
|
|
|
"C_Cpp.vcFormat.newLine.beforeOpenBrace.block" = "sameLine";
|
2023-12-23 22:17:42 +01:00
|
|
|
"C_Cpp.vcFormat.newLine.beforeOpenBrace.function" = "sameLine";
|
2023-12-26 15:37:49 +01:00
|
|
|
"C_Cpp.vcFormat.newLine.beforeElse" = false;
|
|
|
|
|
"C_Cpp.vcFormat.newLine.beforeCatch" = false;
|
2024-03-28 08:45:23 +01:00
|
|
|
"C_Cpp.vcFormat.newLine.beforeOpenBrace.type" = "sameLine";
|
|
|
|
|
"C_Cpp.vcFormat.space.betweenEmptyBraces" = true;
|
|
|
|
|
"C_Cpp.vcFormat.space.betweenEmptyLambdaBrackets" = true;
|
2024-03-28 08:45:58 +01:00
|
|
|
"C_Cpp.vcFormat.indent.caseLabels" = true;
|
2024-03-28 08:45:23 +01:00
|
|
|
"C_Cpp.intelliSenseCacheSize" = 2048;
|
|
|
|
|
"C_Cpp.intelliSenseMemoryLimit" = 2048;
|
2024-03-28 08:49:27 +01:00
|
|
|
"C_Cpp.default.browse.path" = ''[''${workspaceFolder}/**]'';
|
2024-03-28 08:45:23 +01:00
|
|
|
"C_Cpp.default.cStandard" = "c11";
|
|
|
|
|
"C_Cpp.inlayHints.parameterNames.hideLeadingUnderscores" = false;
|
|
|
|
|
"C_Cpp.intelliSenseUpdateDelay" = 500;
|
|
|
|
|
"C_Cpp.workspaceParsingPriority" = "medium";
|
|
|
|
|
"C_Cpp.clang_format_sortIncludes" = true;
|
|
|
|
|
"C_Cpp.doxygen.generatedStyle" = "/**";
|
2023-11-08 20:38:46 +01:00
|
|
|
};
|
2023-12-07 16:03:09 +01:00
|
|
|
# Keybindings
|
|
|
|
|
keybindings = [
|
|
|
|
|
{
|
|
|
|
|
key = "ctrl+q";
|
|
|
|
|
command = "editor.action.commentLine";
|
|
|
|
|
when = "editorTextFocus && !editorReadonly";
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
key = "ctrl+s";
|
|
|
|
|
command = "workbench.action.files.saveFiles";
|
|
|
|
|
}
|
|
|
|
|
];
|
2023-11-05 11:40:44 +01:00
|
|
|
};
|
|
|
|
|
}
|