1
1
Fork 0

vscode: use fhs and fix extension versions

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-09-23 12:10:29 -05:00
parent 111f7c947b
commit 4978f0e28d
Signed by: myned
GPG key ID: C7224454F7881A34

View file

@ -17,13 +17,29 @@ in {
programs.vscode = { programs.vscode = {
enable = true; enable = true;
mutableExtensionsDir = false; mutableExtensionsDir = false;
package = pkgs.vscodium;
# Extension dependencies
# https://wiki.nixos.org/wiki/Visual_Studio_Code#Use_VS_Code_extensions_without_additional_configuration
package = pkgs.vscodium.fhsWithPackages (ps:
with ps; [
alejandra # nix-ide
blueprint-compiler # blueprint-gtk
nixd # nix-ide
shfmt # shell-format
]);
# https://github.com/nix-community/nix-vscode-extensions # https://github.com/nix-community/nix-vscode-extensions
#?? nixos-rebuild repl > inputs.nix-vscode-extensions.extensions.${pkgs.system}.* #?? nixos-rebuild repl > inputs.nix-vscode-extensions.extensions.${pkgs.system}.*
extensions = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ extensions = let
# Some extensions go missing from open-vsx, so use official marketplace # Use configured version of vscode
# https://github.com/nix-community/nix-vscode-extensions?tab=readme-ov-file#note # https://github.com/nix-community/nix-vscode-extensions?tab=readme-ov-file#extensions
#?? extension = with (repo "REPOSITORY"); AUTHOR.EXTENSION
repo = repo:
with inputs.nix-vscode-extensions.extensions.${pkgs.system};
(forVSCodeVersion config.home-manager.users.${config.custom.username}.programs.vscode.package.version).${repo};
in
with (repo "open-vsx");
[
aaron-bond.better-comments aaron-bond.better-comments
antfu.iconify antfu.iconify
antfu.unocss antfu.unocss
@ -31,9 +47,7 @@ in {
bilelmoussaoui.flatpak-vscode bilelmoussaoui.flatpak-vscode
bmalehorn.vscode-fish bmalehorn.vscode-fish
bmewburn.vscode-intelephense-client bmewburn.vscode-intelephense-client
bodil.blueprint-gtk
bradlc.vscode-tailwindcss bradlc.vscode-tailwindcss
cormoran.disable-default-keybinding
csstools.postcss csstools.postcss
dbaeumer.vscode-eslint dbaeumer.vscode-eslint
#// eamodio.gitlens #// eamodio.gitlens
@ -52,23 +66,21 @@ in {
natizyskunk.sftp natizyskunk.sftp
pkief.material-icon-theme pkief.material-icon-theme
pkief.material-product-icons pkief.material-product-icons
sirmspencer.vscode-autohide
sketchbuch.vsc-workspace-sidebar sketchbuch.vsc-workspace-sidebar
svelte.svelte-vscode svelte.svelte-vscode
timonwong.shellcheck timonwong.shellcheck
vincaslt.highlight-matching-tag vincaslt.highlight-matching-tag
]; ]
++ (with (repo "vscode-marketplace"); [
# Some extensions go missing from open-vsx, so use official marketplace as fallback
# https://github.com/nix-community/nix-vscode-extensions?tab=readme-ov-file#note
bodil.blueprint-gtk
cormoran.disable-default-keybinding
sirmspencer.vscode-autohide
]);
}; };
home = { home = {
# Extension dependencies
packages = with pkgs; [
alejandra # nix-ide
blueprint-compiler # blueprint-gtk
nixd # nix-ide
shfmt # shell-format
];
# https://github.com/nix-community/nixd/blob/main/nixd/docs/features.md # https://github.com/nix-community/nixd/blob/main/nixd/docs/features.md
sessionVariables.NIXD_FLAGS = "--inlay-hints=false"; # Disable package versions in the editor sessionVariables.NIXD_FLAGS = "--inlay-hints=false"; # Disable package versions in the editor