VSCode config refactor + save as root extension + .hujson = jsonc

This commit is contained in:
Tyler Beckman 2024-12-04 13:28:30 -07:00
parent 3dc2024b6c
commit c06394b9fe
Signed by: Ty
GPG key ID: 2813440C772555A4

View file

@ -1,33 +1,51 @@
{ pkgs, inputs, system, ... }: { pkgs, inputs, system, ... }:
{ {
programs.vscode = { programs.vscode = let vscode-package = pkgs.vscodium; in {
enable = true; enable = true;
package = pkgs.vscodium; package = vscode-package;
enableUpdateCheck = false; enableUpdateCheck = false;
enableExtensionUpdateCheck = false; enableExtensionUpdateCheck = false;
mutableExtensionsDir = false; mutableExtensionsDir = false;
extensions = with inputs.vscode-extensions.extensions."${system}".open-vsx; [ extensions = with (inputs.vscode-extensions.extensions."${system}".forVSCodeVersion (
# Language support # Get pkgs.vscodium version, and remove the 4th part (forVSCodeVersion only expects 3 parts)
rust-lang.rust-analyzer # Rust # By using forVSCodeVersion, any unsupported versions are automatically excluded and this config
llvm-vs-code-extensions.vscode-clangd # C++ # won't build (rather than only finding out in vscode itself)
vadimcn.vscode-lldb # C++ Debugging pkgs.lib.strings.concatStringsSep "." (
jnoortheen.nix-ide # Nix pkgs.lib.lists.take 3 (
tamasfe.even-better-toml # TOML pkgs.lib.strings.splitString "." vscode-package.version
yzhang.markdown-all-in-one # Markdown )
denoland.vscode-deno # Deno JS/TS )
# Theming )); (
pkief.material-icon-theme # Material icons (with open-vsx; [
# Utilities # Language support
streetsidesoftware.code-spell-checker # Spellchecking rust-lang.rust-analyzer # Rust
]; llvm-vs-code-extensions.vscode-clangd # C++
vadimcn.vscode-lldb # C++ Debugging
jnoortheen.nix-ide # Nix
tamasfe.even-better-toml # TOML
yzhang.markdown-all-in-one # Markdown
denoland.vscode-deno # Deno JS/TS
# Theming
pkief.material-icon-theme # Material icons
# Utilities
streetsidesoftware.code-spell-checker # Spellchecking
jeanp413.open-remote-ssh # Remote SSH
])
++ (with vscode-marketplace; [
yy0931.save-as-root # Save as root over SSH
])
);
userSettings = { userSettings = {
# Editor # Editor
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'Droid Sans Mono', 'monospace', monospace"; "editor.fontFamily" = "'FiraCode Nerd Font Mono', 'Droid Sans Mono', 'monospace', monospace";
"editor.indentSize" = "tabSize"; "editor.indentSize" = "tabSize";
"editor.tabSize" = 4; "editor.tabSize" = 4;
"files.associations" = {
"*.hujson" = "jsonc";
};
# JJ # JJ
"files.watcherExclude" = { "files.watcherExclude" = {
"**/.git/objects/**" = true; "**/.git/objects/**" = true;