From a16fcb9f51d83faaa91160cbf0b5740ad86bd265 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 13 Sep 2025 17:37:34 +0200 Subject: [PATCH] Set nvim as default editor across all configurations - Add EDITOR and VISUAL environment variables to fish shell init - Add system-level EDITOR and VISUAL variables for macOS and WSL - Ensures nvim is used as default editor for git, system tools, and applications - Maintains existing neovim defaultEditor configuration --- nixos/fish.nix | 4 ++++ nixos/hosts/macos.nix | 2 ++ nixos/hosts/wsl.nix | 2 ++ 3 files changed, 8 insertions(+) diff --git a/nixos/fish.nix b/nixos/fish.nix index 70ad917..02d1932 100644 --- a/nixos/fish.nix +++ b/nixos/fish.nix @@ -59,6 +59,10 @@ if test -d /opt/homebrew/bin fish_add_path -g /opt/homebrew/bin /opt/homebrew/sbin end + + # Set default editor + set -gx EDITOR nvim + set -gx VISUAL nvim ''; }; diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index 838efb9..27b15e5 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -46,6 +46,8 @@ # Environment environment.variables = { DBT_USER = "DNTH"; + EDITOR = "nvim"; + VISUAL = "nvim"; }; environment.systemPackages = with pkgs; [ diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix index c2817b9..c3fb4e7 100644 --- a/nixos/hosts/wsl.nix +++ b/nixos/hosts/wsl.nix @@ -49,6 +49,8 @@ nixpkgs.config.allowUnfree = true; environment.variables = { DBT_USER = "DNTH"; + EDITOR = "nvim"; + VISUAL = "nvim"; }; environment.systemPackages = with pkgs; [