2024-12-02 03:57:34 -07:00
|
|
|
{ pkgs, inputs, system, ... }:
|
|
|
|
{
|
2024-12-04 13:28:30 -07:00
|
|
|
programs.vscode = let vscode-package = pkgs.vscodium; in {
|
2024-12-02 03:57:34 -07:00
|
|
|
enable = true;
|
2024-12-04 13:28:30 -07:00
|
|
|
package = vscode-package;
|
2024-12-02 03:57:34 -07:00
|
|
|
|
|
|
|
enableUpdateCheck = false;
|
|
|
|
enableExtensionUpdateCheck = false;
|
|
|
|
mutableExtensionsDir = false;
|
|
|
|
|
2024-12-04 13:28:30 -07:00
|
|
|
extensions = with (inputs.vscode-extensions.extensions."${system}".forVSCodeVersion (
|
|
|
|
# Get pkgs.vscodium version, and remove the 4th part (forVSCodeVersion only expects 3 parts)
|
|
|
|
# By using forVSCodeVersion, any unsupported versions are automatically excluded and this config
|
|
|
|
# won't build (rather than only finding out in vscode itself)
|
|
|
|
pkgs.lib.strings.concatStringsSep "." (
|
|
|
|
pkgs.lib.lists.take 3 (
|
|
|
|
pkgs.lib.strings.splitString "." vscode-package.version
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)); (
|
|
|
|
(with open-vsx; [
|
|
|
|
# Language support
|
|
|
|
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
|
2024-12-11 00:59:49 -07:00
|
|
|
mathiasfrohlich.kotlin # Kotlin (no LSP)
|
|
|
|
matthewpi.caddyfile-support # Caddyfile
|
2024-12-04 13:28:30 -07:00
|
|
|
# Theming
|
|
|
|
pkief.material-icon-theme # Material icons
|
|
|
|
# Utilities
|
|
|
|
streetsidesoftware.code-spell-checker # Spellchecking
|
|
|
|
jeanp413.open-remote-ssh # Remote SSH
|
2024-12-04 19:31:29 -07:00
|
|
|
mkhl.direnv # nix-direnv autoloading
|
2024-12-11 00:59:49 -07:00
|
|
|
cschlosser.doxdocgen # C++ Doxygen generator
|
|
|
|
tomoki1207.pdf # PDF Viewing
|
2024-12-04 13:28:30 -07:00
|
|
|
])
|
|
|
|
++ (with vscode-marketplace; [
|
|
|
|
yy0931.save-as-root # Save as root over SSH
|
2024-12-11 00:59:49 -07:00
|
|
|
akiramiyakoda.cppincludeguard # Auto-insert header guards for header files
|
2024-12-04 13:28:30 -07:00
|
|
|
])
|
|
|
|
);
|
2024-12-02 03:57:34 -07:00
|
|
|
|
|
|
|
userSettings = {
|
|
|
|
# Editor
|
|
|
|
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'Droid Sans Mono', 'monospace', monospace";
|
|
|
|
"editor.indentSize" = "tabSize";
|
|
|
|
"editor.tabSize" = 4;
|
2024-12-04 13:28:30 -07:00
|
|
|
"files.associations" = {
|
|
|
|
"*.hujson" = "jsonc";
|
|
|
|
};
|
2024-12-02 03:57:34 -07:00
|
|
|
# JJ
|
|
|
|
"files.watcherExclude" = {
|
|
|
|
"**/.git/objects/**" = true;
|
|
|
|
"**/.git/subtree-cache/**" = true;
|
|
|
|
"**/.hg/store/**" = true;
|
|
|
|
"**/.jj" = true;
|
|
|
|
};
|
|
|
|
"files.exclude" = {
|
|
|
|
"**/.git" = true;
|
|
|
|
"**/.jj" = true;
|
|
|
|
"**/.svn" = true;
|
|
|
|
"**/.hg" = true;
|
|
|
|
"**/CVS" = true;
|
|
|
|
"**/.DS_Store" = true;
|
|
|
|
"**/Thumbs.db" = true;
|
|
|
|
};
|
|
|
|
# Nix
|
|
|
|
"nix.enableLanguageServer" = true;
|
|
|
|
"nix.serverPath" = "nixd";
|
|
|
|
"nix.serverSettings" = {
|
|
|
|
nixd = {
|
|
|
|
formatting = {
|
|
|
|
command = [ "nixfmt" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
expr = ''import (builtins.getFlake "/etc/nixos").inputs.nixpkgs { }'';
|
|
|
|
};
|
|
|
|
|
|
|
|
options = {
|
|
|
|
nixos = {
|
|
|
|
expr = ''(builtins.getFlake "/etc/nixos").nixosConfigurations.ty-nixos.options'';
|
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
expr = ''(builtins.getFlake "/etc/nixos").homeConfigurations."ty".options'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-12-05 00:31:27 -07:00
|
|
|
"direnv.restart.automatic" = true;
|
2024-12-11 00:59:49 -07:00
|
|
|
# C++ Include guards
|
|
|
|
"C/C++ Include Guard.Comment Style" = "Line";
|
|
|
|
"C/C++ Include Guard.Macro Type" = "Filename";
|
2024-12-02 03:57:34 -07:00
|
|
|
};
|
|
|
|
};
|
2024-12-04 19:31:29 -07:00
|
|
|
}
|