summary refs log tree commit diff
diff options
context:
space:
mode:
authorpacien <pacien.trangirard@pacien.net>2022-10-10 17:26:11 +0200
committerpacien <pacien.trangirard@pacien.net>2022-10-10 17:26:15 +0200
commit4e1ffaca0158f91704114fbb4543161bff45f624 (patch)
tree3c18c099584e60b8a2a8e8af3c60a84a462f3176
parentabf0c51335f4444b544c9448371a00720c8e2ca7 (diff)
downloadnixpkgs-4e1ffaca0158f91704114fbb4543161bff45f624.tar
nixpkgs-4e1ffaca0158f91704114fbb4543161bff45f624.tar.gz
nixpkgs-4e1ffaca0158f91704114fbb4543161bff45f624.tar.bz2
nixpkgs-4e1ffaca0158f91704114fbb4543161bff45f624.tar.lz
nixpkgs-4e1ffaca0158f91704114fbb4543161bff45f624.tar.xz
nixpkgs-4e1ffaca0158f91704114fbb4543161bff45f624.tar.zst
nixpkgs-4e1ffaca0158f91704114fbb4543161bff45f624.zip
nixos/neovim: add note about not loading init.vim
Neovim does not load the user configuration when enabled through the
module, unlike when the package is added to the home or system packages
directly. I think this difference is worth mentioning in the module's
documentation, because it was confusing to some friends.
-rw-r--r--nixos/modules/programs/neovim.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/nixos/modules/programs/neovim.nix b/nixos/modules/programs/neovim.nix
index 31848c246f6..8de527fceb2 100644
--- a/nixos/modules/programs/neovim.nix
+++ b/nixos/modules/programs/neovim.nix
@@ -11,7 +11,19 @@ let
 
 in {
   options.programs.neovim = {
-    enable = mkEnableOption (lib.mdDoc "Neovim");
+    enable = mkOption {
+      type = types.bool;
+      default = false;
+      example = true;
+      description = lib.mdDoc ''
+        Whether to enable Neovim.
+
+        When enabled through this option, Neovim is wrapped to use a
+        configuration managed by this module. The configuration file in the
+        user's home directory at {file}`~/.config/nvim/init.vim` is no longer
+        loaded by default.
+      '';
+    };
 
     defaultEditor = mkOption {
       type = types.bool;