many improvements
This commit is contained in:
@@ -1,153 +1,192 @@
|
||||
{pkgs, ...}:
|
||||
let
|
||||
baseExtensions = with pkgs.vscode-extensions; [
|
||||
# QOL
|
||||
mhutchie.git-graph
|
||||
redhat.vscode-yaml
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
|
||||
# Nix environment selector
|
||||
arrterian.nix-env-selector
|
||||
];
|
||||
baseSettings = {
|
||||
# visual
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
|
||||
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace";
|
||||
"terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono";
|
||||
"workbench.iconTheme" = "vs-seti";
|
||||
|
||||
# telemetry
|
||||
"telemetry.enableCrashReporter" = false;
|
||||
"telemetry.enableTelemetry" = false;
|
||||
"redhat.telemetry.enabled" = false;
|
||||
|
||||
# editor QOL
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
"editor.wordWrap" = "on";
|
||||
"editor.suggestSelection" = "first";
|
||||
"editor.renderWhitespace" = "none";
|
||||
"editor.acceptSuggestionOnEnter" = "off";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.inlineSuggest.enabled" = true;
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
"editor.unicodeHighlight.nonBasicASCII" = false;
|
||||
"editor.unicodeHighlight.invisibleCharacters" = false;
|
||||
"editor.unicodeHighlight.ambiguousCharacters" = false;
|
||||
|
||||
"files.autoSave" = "onWindowChange";
|
||||
"files.autoSaveDelay" = 1000;
|
||||
"files.insertFinalNewline" = true;
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"terminal.integrated.enableMultiLinePasteWarning" = false;
|
||||
"update.showReleaseNotes" = false;
|
||||
"terminal.external.linuxExec" = "kitty";
|
||||
"workbench.startupEditor" = "newUntitledFile";
|
||||
|
||||
# Extension management
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.ignoreRecommendations" = true;
|
||||
|
||||
# git
|
||||
"git.ignoreMissingGitWarning" = true;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.autofetch" = true;
|
||||
"diffEditor.renderSideBySide" = false;
|
||||
"diffEditor.hideUnchangedRegions.enabled" = true;
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
|
||||
# Copilot
|
||||
"github.copilot.editor.enableAutoCompletions" = true;
|
||||
"github.copilot.advanced" = {};
|
||||
"github.copilot.enable" = {
|
||||
"*" = true;
|
||||
};
|
||||
|
||||
# Python
|
||||
"python.terminal.activateEnvironment" = false; # let nix-shell handle this
|
||||
};
|
||||
|
||||
baseKeybindings = [
|
||||
# comment/uncomment line
|
||||
{
|
||||
key = "ctrl+[Backslash]"; # was ctrl+# but vscode reads the key differently apparently
|
||||
command = "editor.action.commentLine";
|
||||
when = "editorTextFocus";
|
||||
}
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
# install vscode in a FHS environment to allow extensions with prebuilt binaries
|
||||
# package = pkgs.vscode.fhs;
|
||||
|
||||
# profiles = {
|
||||
# default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# QOL
|
||||
mhutchie.git-graph
|
||||
redhat.vscode-yaml
|
||||
github.copilot
|
||||
|
||||
# python
|
||||
ms-python.python
|
||||
ms-python.isort
|
||||
ms-python.debugpy
|
||||
ms-python.vscode-pylance
|
||||
# ms-toolsai.jupyter
|
||||
# ms-toolsai.vscode-jupyter-slideshow
|
||||
# ms-toolsai.jupyter-renderers
|
||||
|
||||
# Nix language
|
||||
jnoortheen.nix-ide
|
||||
|
||||
# typst
|
||||
myriad-dreamin.tinymist
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "jupyter";
|
||||
publisher = "ms-toolsai";
|
||||
version = "2025.3.2025032101";
|
||||
sha256 = "sha256-s2qEUl9J6EOije6MasZOnHErYs3NYXBqLSfMT03vEH0=";
|
||||
}
|
||||
{
|
||||
name = "jupyter-hub";
|
||||
publisher = "ms-toolsai";
|
||||
version = "2024.10.1002831100";
|
||||
sha256 = "sha256-5IRczwXbYkDdYEOXvQnnH+HJNLvsRsrZ6fnoVCveqrs=";
|
||||
}
|
||||
];
|
||||
|
||||
keybindings = [
|
||||
# comment/uncomment line
|
||||
{
|
||||
key = "ctrl+#";
|
||||
command = "editor.action.commentLine";
|
||||
when = "editorTextFocus";
|
||||
}
|
||||
# run code cell in jupyter
|
||||
{
|
||||
key = "ctrl+enter";
|
||||
command = "jupyter.runCell";
|
||||
when = "editorTextFocus && editorHasSelection && jupyter.notebookEditorFocused";
|
||||
}
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
# visual
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
|
||||
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace";
|
||||
"terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono";
|
||||
"workbench.iconTheme" = "vs-seti";
|
||||
|
||||
# telemetry
|
||||
"telemetry.enableCrashReporter" = false;
|
||||
"telemetry.enableTelemetry" = false;
|
||||
"redhat.telemetry.enabled" = false;
|
||||
|
||||
|
||||
# editor QOL
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
"editor.wordWrap" = "on";
|
||||
"editor.suggestSelection" = "first";
|
||||
"editor.renderWhitespace" = "none";
|
||||
"editor.acceptSuggestionOnEnter" = "off";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.inlineSuggest.enabled" = true;
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
"editor.unicodeHighlight.nonBasicASCII" = false;
|
||||
"editor.unicodeHighlight.invisibleCharacters" = false;
|
||||
"editor.unicodeHighlight.ambiguousCharacters" = false;
|
||||
|
||||
"files.autoSave" = "onWindowChange";
|
||||
"files.autoSaveDelay" = 1000;
|
||||
"files.insertFinalNewline" = true;
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"terminal.integrated.enableMultiLinePasteWarning" = false;
|
||||
"update.showReleaseNotes" = false;
|
||||
"terminal.external.linuxExec" = "kitty";
|
||||
"workbench.startupEditor" = "newUntitledFile";
|
||||
# "workbench.colorTheme" = "Default Light+";
|
||||
|
||||
# Extension management
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.ignoreRecommendations" = true;
|
||||
|
||||
|
||||
# git
|
||||
"git.ignoreMissingGitWarning" = true;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.autofetch" = true;
|
||||
"diffEditor.renderSideBySide" = false;
|
||||
"diffEditor.hideUnchangedRegions.enabled" = true;
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
|
||||
# Copilot
|
||||
"github.copilot.editor.enableAutoCompletions" = true;
|
||||
"github.copilot.advanced" = {};
|
||||
"github.copilot.enable" = {
|
||||
"*" = true;
|
||||
profiles.default = {
|
||||
userSettings = baseSettings // {
|
||||
"window.newWindowProfile" = "development";
|
||||
};
|
||||
|
||||
# Python
|
||||
"python.terminal.activateEnvironment" = false; # let nix-shell handle this
|
||||
"jupyter.disableJupyterAutoStart" = true;
|
||||
"jupyter.askForKernelRestart" = false;
|
||||
"workbench.editorAssociations" = {
|
||||
"*.ipynb" = "jupyter-notebook";
|
||||
};
|
||||
"notebook.cellToolbarLocation" = {
|
||||
"default" = "right";
|
||||
"jupyter-notebook" = "left";
|
||||
};
|
||||
"jupyter.widgetScriptSources" = [
|
||||
"jsdelivr.com"
|
||||
"unpkg.com"
|
||||
];
|
||||
|
||||
|
||||
# Typst
|
||||
"[typst]" = {
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"[typst-code]" = {
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"tinymist.fontPaths" = [
|
||||
"./font"
|
||||
];
|
||||
};
|
||||
|
||||
profiles.development = {
|
||||
extensions = baseExtensions ++ (with pkgs.vscode-extensions; [
|
||||
# python
|
||||
ms-python.python
|
||||
ms-python.isort
|
||||
ms-python.debugpy
|
||||
ms-python.vscode-pylance
|
||||
|
||||
# nix language
|
||||
jnoortheen.nix-ide
|
||||
|
||||
# Flutter and co
|
||||
dart-code.flutter
|
||||
dart-code.dart-code
|
||||
|
||||
]);
|
||||
|
||||
keybindings = baseKeybindings;
|
||||
|
||||
userSettings = baseSettings;
|
||||
};
|
||||
|
||||
|
||||
profiles.science = {
|
||||
extensions = baseExtensions ++ (with pkgs.vscode-extensions; [
|
||||
# python + jupyter
|
||||
ms-python.python
|
||||
ms-python.isort
|
||||
ms-python.debugpy
|
||||
ms-python.vscode-pylance
|
||||
ms-toolsai.vscode-jupyter-slideshow
|
||||
ms-toolsai.jupyter-renderers
|
||||
|
||||
# Typst
|
||||
myriad-dreamin.tinymist
|
||||
]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "jupyter";
|
||||
publisher = "ms-toolsai";
|
||||
version = "2025.3.2025032101";
|
||||
sha256 = "sha256-s2qEUl9J6EOije6MasZOnHErYs3NYXBqLSfMT03vEH0=";
|
||||
}
|
||||
{
|
||||
name = "jupyter-hub";
|
||||
publisher = "ms-toolsai";
|
||||
version = "2024.10.1002831100";
|
||||
sha256 = "sha256-5IRczwXbYkDdYEOXvQnnH+HJNLvsRsrZ6fnoVCveqrs=";
|
||||
}
|
||||
];
|
||||
|
||||
keybindings = baseKeybindings ++ [
|
||||
# run code cell in jupyter
|
||||
{
|
||||
key = "ctrl+enter";
|
||||
command = "jupyter.runcurrentcell";
|
||||
when = "editorTextFocus && isWorkspaceTrusted && jupyter.hascodecells && !editorHasSelection && !isCompositeNotebook && !notebookEditorFocused";
|
||||
}
|
||||
];
|
||||
|
||||
userSettings = baseSettings // {
|
||||
"jupyter.disableJupyterAutoStart" = true;
|
||||
"jupyter.askForKernelRestart" = false;
|
||||
"workbench.editorAssociations" = {
|
||||
"*.ipynb" = "jupyter-notebook";
|
||||
};
|
||||
"notebook.cellToolbarLocation" = {
|
||||
"default" = "right";
|
||||
"jupyter-notebook" = "left";
|
||||
};
|
||||
"jupyter.widgetScriptSources" = [
|
||||
"jsdelivr.com"
|
||||
"unpkg.com"
|
||||
];
|
||||
|
||||
# Typst
|
||||
"[typst]" = {
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"[typst-code]" = {
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"tinymist.fontPaths" = [
|
||||
"./font"
|
||||
];
|
||||
"workbench.colorCustomizations" = {
|
||||
"statusBar.background" = "#003f9293";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user