Fixed vscode customization

This commit is contained in:
Jan-Bulthuis 2025-04-16 13:03:45 +02:00
parent 9c9fe6b18a
commit 8738fa3066
10 changed files with 133 additions and 112 deletions

View File

@ -33,14 +33,17 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
ms-vscode.cpptools extensions = with pkgs.vscode-extensions; [
ms-vscode.cmake-tools ms-vscode.cpptools
ms-vscode.cpptools-extension-pack ms-vscode.cmake-tools
]; ms-vscode.cpptools-extension-pack
];
userSettings = { userSettings = {
# "C_Cpp.clang_format_fallbackStyle" = "{ BasedOnStyle: Google, IndentWidth: 4 }"; # TODO: Add setting to set the compiler, it currently needs to be set for each workspace individually
# "C_Cpp.clang_format_fallbackStyle" = "{ BasedOnStyle: Google, IndentWidth: 4 }";
};
}; };
}; };

View File

@ -23,14 +23,16 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
haskell.haskell extensions = with pkgs.vscode-extensions; [
justusadam.language-haskell haskell.haskell
]; justusadam.language-haskell
];
userSettings = { userSettings = {
"[haskell]" = { }; "[haskell]" = { };
# "haskell.formattingProvider" = "fourmolu"; # "haskell.formattingProvider" = "fourmolu";
};
}; };
}; };

View File

@ -23,11 +23,13 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
bradlc.vscode-tailwindcss extensions = with pkgs.vscode-extensions; [
]; bradlc.vscode-tailwindcss
];
userSettings = { }; userSettings = { };
};
}; };
# Neovim configuration # Neovim configuration

View File

@ -28,12 +28,14 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
ms-toolsai.jupyter extensions = with pkgs.vscode-extensions; [
ms-toolsai.jupyter-renderers ms-toolsai.jupyter
]; ms-toolsai.jupyter-renderers
];
userSettings = { }; userSettings = { };
};
}; };
# Neovim configuration # Neovim configuration

View File

@ -32,18 +32,20 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ]; profiles.default = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
userSettings = { userSettings = {
"[nix]" = { "[nix]" = {
"editor.tabSize" = 2; "editor.tabSize" = 2;
}; };
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd"; "nix.serverPath" = "nixd";
"nix.serverSettings" = { "nix.serverSettings" = {
nixd = { nixd = {
formatting = { formatting = {
command = [ "nixfmt" ]; command = [ "nixfmt" ];
};
}; };
}; };
}; };

View File

@ -34,17 +34,19 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
ms-python.python extensions = with pkgs.vscode-extensions; [
ms-python.debugpy ms-python.python
ms-python.vscode-pylance ms-python.debugpy
ms-python.black-formatter ms-python.vscode-pylance
]; ms-python.black-formatter
];
userSettings = { userSettings = {
"python.defaultInterpreterPath" = "\${env:PYTHONINTERPRETER}"; "python.defaultInterpreterPath" = "\${env:PYTHONINTERPRETER}";
"[python]" = { "[python]" = {
"editor.defaultFormatter" = "ms-python.black-formatter"; "editor.defaultFormatter" = "ms-python.black-formatter";
};
}; };
}; };
}; };

View File

@ -31,19 +31,21 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
rust-lang.rust-analyzer extensions = with pkgs.vscode-extensions; [
vadimcn.vscode-lldb rust-lang.rust-analyzer
tamasfe.even-better-toml vadimcn.vscode-lldb
serayuzgur.crates tamasfe.even-better-toml
]; serayuzgur.crates
];
userSettings = { userSettings = {
"[rust]" = { "[rust]" = {
"editor.inlayHints.enabled" = "off"; "editor.inlayHints.enabled" = "off";
};
"rust-analyzer.check.command" = "clippy";
"rust-analyzer.showUnlinkedFileNotification" = false;
}; };
"rust-analyzer.check.command" = "clippy";
"rust-analyzer.showUnlinkedFileNotification" = false;
}; };
}; };

View File

@ -29,10 +29,12 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ]; profiles.default = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
userSettings = { userSettings = {
"[tex]" = { }; "[tex]" = { };
};
}; };
}; };

View File

@ -27,11 +27,13 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
ms-azuretools.vscode-docker extensions = with pkgs.vscode-extensions; [
]; ms-azuretools.vscode-docker
];
userSettings = { userSettings = {
};
}; };
}; };

View File

@ -37,63 +37,65 @@ in
enable = true; enable = true;
mutableExtensionsDir = false; mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [ profiles.default = {
eamodio.gitlens extensions = with pkgs.vscode-extensions; [
ms-vscode.hexeditor eamodio.gitlens
mkhl.direnv ms-vscode.hexeditor
usernamehw.errorlens mkhl.direnv
gruntfuggly.todo-tree usernamehw.errorlens
github.copilot gruntfuggly.todo-tree
github.copilot-chat github.copilot
tomoki1207.pdf github.copilot-chat
ms-vsliveshare.vsliveshare tomoki1207.pdf
]; ms-vsliveshare.vsliveshare
];
userSettings = userSettings =
let let
font-family = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'"; font-family = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'";
# TODO: Move the conversion factor to theme settings # TODO: Move the conversion factor to theme settings
font-size = mkForce cfg.codeFont.recommendedSize; # Convert pt to px font-size = mkForce cfg.codeFont.recommendedSize; # Convert pt to px
in in
{ {
# Font setup # Font setup
"editor.fontFamily" = font-family; "editor.fontFamily" = font-family;
"editor.inlayHints.fontFamily" = font-family; "editor.inlayHints.fontFamily" = font-family;
"editor.inlineSuggest.fontFamily" = font-family; "editor.inlineSuggest.fontFamily" = font-family;
"editor.fontSize" = font-size; "editor.fontSize" = font-size;
"editor.fontLigatures" = true; "editor.fontLigatures" = true;
"terminal.integrated.fontFamily" = font-family; "terminal.integrated.fontFamily" = font-family;
"terminal.integrated.fontSize" = font-size; "terminal.integrated.fontSize" = font-size;
"chat.editor.fontFamily" = font-family; # TODO: Change this font to the standard UI font "chat.editor.fontFamily" = font-family; # TODO: Change this font to the standard UI font
"chat.editor.fontSize" = font-size; "chat.editor.fontSize" = font-size;
"debug.console.fontFamily" = font-family; "debug.console.fontFamily" = font-family;
"debug.console.fontSize" = font-size; "debug.console.fontSize" = font-size;
"scm.inputFontFamily" = font-family; # TODO: Change this font to the standard UI font "scm.inputFontFamily" = font-family; # TODO: Change this font to the standard UI font
"scm.inputFontSize" = font-size; "scm.inputFontSize" = font-size;
"markdown.preview.fontFamily" = mkForce theme.fonts.sansSerif.name; # TODO: Change this font to the standard UI font "markdown.preview.fontFamily" = mkForce theme.fonts.sansSerif.name; # TODO: Change this font to the standard UI font
"markdown.preview.fontSize" = mkForce theme.fonts.sansSerif.recommendedSize; "markdown.preview.fontSize" = mkForce theme.fonts.sansSerif.recommendedSize;
# Formatting # Formatting
"editor.formatOnSave" = true; "editor.formatOnSave" = true;
"editor.tabSize" = 4; "editor.tabSize" = 4;
# Layout # Layout
"window.menuBarVisibility" = "hidden"; "window.menuBarVisibility" = "hidden";
# Git settings # Git settings
"git.autofetch" = true; "git.autofetch" = true;
"git.enableSmartCommit" = false; "git.enableSmartCommit" = false;
"git.suggestSmartCommit" = false; "git.suggestSmartCommit" = false;
# Disable update notifications # Disable update notifications
"update.mode" = "none"; "update.mode" = "none";
# TODO: Move to direnv module # TODO: Move to direnv module
# Ignore direnv folder # Ignore direnv folder
"files.exclude" = { "files.exclude" = {
".direnv" = true; ".direnv" = true;
};
}; };
}; };
}; };
}; };
} }