From 5c853ff9ff44075435dfd5406a974ce6e79963e5 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 17 Mar 2023 09:07:35 +0000 Subject: [PATCH] README: add devShell example --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 99e7190e..46703c6d 100644 --- a/README.md +++ b/README.md @@ -140,12 +140,30 @@ can use the following: }); } ``` - You can then run neovim using `nix run .# -- `. This can be useful to test config changes easily. +### With a `devShell` + +You can also use nixvim to define an instance which will only be available inside of a Nix `devShell`: + +
+ devShell configuration + +```nix +let + nvim = nixvim.legacyPackages.x86_64-linux.makeNixvim { + plugins.lsp.enable = true; + }; +in pkgs.mkShell { + buildInputs = [nvim]; +}; +``` + +
+ ### Advanced Usage You may want more control over the nixvim modules like: