dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/apps/vscode/_profile.nix (2141B)
1## Shared Editor Profile
2{
3 lib,
4 pkgs,
5 files,
6 font,
7 isGnome,
8 isWM,
9}:
10with files.vscode; {
11 # Keyboard Shortcuts
12 inherit keybindings;
13
14 # Settings
15 userSettings = lib.mkMerge [
16 (settings
17 // {
18 "workbench.colorTheme" = lib.mkDefault "Dark 2026";
19 "editor.fontFamily" = "'${font}', 'monospace', monospace";
20 })
21 (lib.mkIf isGnome {
22 "workbench.productIconTheme" = "adwaita";
23 "terminal.external.linuxExec" = "ghostty";
24 })
25 (lib.mkIf isWM {
26 "terminal.external.linuxExec" = "kitty";
27 })
28 (let
29 lemminx = "${pkgs.lemminx}/bin/lemminx";
30 in {
31 "xml.server.preferBinary" = true;
32 "xml.server.binary.path" = lemminx;
33 "xml.server.binary.trustedHashes" = [(builtins.hashFile "sha256" lemminx)];
34 "direnv.restart.automatic" = true;
35 "direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
36 "direnv.status.show" = true;
37 })
38 ];
39
40 ## Editor Extensions
41 extensions = with pkgs.vscode-extensions;
42 [
43 aaron-bond.better-comments # Annotations
44 editorconfig.editorconfig # .editorconfig
45 esbenp.prettier-vscode # Formatter
46 file-icons.file-icons # File Icons
47 naumovs.color-highlight # Color Viewer
48 johnpapa.vscode-peacock # Workspace Color
49
50 mkhl.direnv # Direnv Integration
51 github.vscode-pull-request-github # GitHub
52 dart-code.dart-code # Dart
53 dart-code.flutter # Flutter
54 jnoortheen.nix-ide # Nix
55 ms-vscode.cpptools # C/C++
56 redhat.java # Java
57 rust-lang.rust-analyzer # Rust
58 tombi-toml.tombi # TOML
59 yzhang.markdown-all-in-one # Markdown
60
61 # Python
62 ms-python.python
63 charliermarsh.ruff
64 detachhead.basedpyright
65
66 # HTML/CSS/XML
67 ecmel.vscode-html-css
68 redhat.vscode-xml
69
70 # JS
71 dbaeumer.vscode-eslint
72 ms-vscode.live-server # Live Preview
73 ]
74 ++ (with pkgs.vscode-marketplace; [
75 cweijan.vscode-office # Document Viewer
76 bruno-api-client.bruno # API Client
77 langningchen.cph-ng # CP
78 ])
79 ++ lib.optionals isGnome [pkgs.vscode-extensions.piousdeer.adwaita-theme];
80}