From 2cf1a4f97dc180748be2ec25ef4e326f1fa501e3 Mon Sep 17 00:00:00 2001 From: Heitor Augusto Date: Fri, 27 Dec 2024 03:27:40 -0300 Subject: [PATCH] docs: add nixvim examples --- README.md | 88 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 59 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index a7c9686..429b3dc 100755 --- a/README.md +++ b/README.md @@ -285,38 +285,68 @@ require("lz.n").load {
- Nix (Home Manager) example + Nix (Home Manager) example ```nix - programs.neovim = { - enable = true; - plugins = with pkgs.vimPlugins [ - lz-n - { - plugin = pkgs.vimPlugins.telescope-nvim; - config = '' - require("lz.n").load { - "telescope.nvim", - cmd = "Telescope", - } - ''; - type = "lua"; - optional = true; - } - { - plugin = pkgs.vimPlugins.sweetie-nvim; - config = '' - require("lz.n").load { - "sweetie.nvim", - colorscheme = "sweetie", - } - ''; - type = "lua"; - optional = true; - } - ]; - }; + { + programs.neovim = { + enable = true; + plugins = with pkgs.vimPlugins [ + lz-n + { + plugin = pkgs.vimPlugins.telescope-nvim; + config = '' + require("lz.n").load { + "telescope.nvim", + cmd = "Telescope", + } + ''; + type = "lua"; + optional = true; + } + { + plugin = pkgs.vimPlugins.sweetie-nvim; + config = '' + require("lz.n").load { + "sweetie.nvim", + colorscheme = "sweetie", + } + ''; + type = "lua"; + optional = true; + } + ]; + }; + } + ``` + +
+ +
+ + Nix (NixVim) example + + + > You can find up-to-date NixVim documentation for lazy-loading with `lz.n` here: + > + > https://nix-community.github.io/nixvim/user-guide/lazy-loading + + ```nix + { + # Enable lz.n as lazy-loading provider + plugins.lz-n.enable = true; + + plugins.telescope = { + enable = true; + lazyLoad.settings.cmd = "Telescope"; + }; + + colorschemes.catppuccin = { + enable = true; + lazyLoad.settings.colorscheme = "catppuccin"; + }; + } ```