{ pkgs, pkgsUnstable, ... }:

let
  commonExtensions = with pkgs.vscode-extensions; [
    ms-dotnettools.csharp
    ms-dotnettools.csdevkit
    ms-dotnettools.vscode-dotnet-runtime
    mkhl.direnv # Direnv integration for VSCode
    catppuccin.catppuccin-vsc
    bmewburn.vscode-intelephense-client
    continue.continue
    vue.volar
  ];
  commonSettings = {
    "editor.lineNumbers" = "relative";
    "workbench.colorTheme" = "Catppuccin Mocha";
    "workbench.editor.enablePreview" = false;
    "direnv.restart.automatic" = true;
    "terminal.integrated.defaultProfile.linux" = "zsh";
    "terminal.integrated.profiles.linux" = {
      zsh = {
        path = pkgs.zsh;
      };
    };
  };

in
{
  programs.vscode = {
    enable = true;
    package = pkgsUnstable.vscode.fhs;
    profiles.default.extensions = commonExtensions;
    profiles.default.userSettings = commonSettings;
  };
  programs.cursor = {
    enable = true;
    package = pkgsUnstable.code-cursor-fhs;
    profiles.default.extensions = commonExtensions;
    profiles.default.userSettings = commonSettings;
  };
}
