Skip to content

psychosis448/lazyvim-nix-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

 Nix + 💤 LazyVim & 󰢱 Lua

A minimal starter template for LazyVim on Nix with Home Manager using Lua, based on the lazy.nvim on NixOS guide by KFerasoff.

The template uses Nix to manage Neovim as a software packages and its plugins. But it uses Lua for configuration of Neovim and the plugins themselves. All the LazyVim plugins are disabled, so that you can start from a (somewhat) clean sheet and decide for yourself which plugins you want to enable. Nevertheless, all the LazyVim default autocmds, keymaps and options are still enabled, which might easily lead to errors. So you might want to disable unused autocmds/keymaps/options that rely on not installed plugins!

Please check KFerasoff's guide for more details about the general setup.

Installing Plugins

As mentioned, we manage the installation of Neovim and its plugins with Nix. Let's add and configure a custom colorscheme, e.g. Modus Themes.

  1. Add plugin to programs.neovim.plugins in default.nix (e.g. modus-themes-nvim)
  2. Configure plugin in ./lua/plugins directory (e.g. lazyvim.lua)
  3. Rebuild your configuration

Enabling LazyVim Plugins

Same procedure as mentioned above:

  1. Add plugin to programs.neovim.plugins in default.nix (e.g. which-key)
  2. Optional: configure plugin in ./lua/plugins directory (e.g. which-key.lua)
  3. Rebuild your configuration

Enabling LazyVim Extras

To enable LazyVim Extras, you simply follow the above pattern with a small change:

  1. Add plugin to programs.neovim.plugins in default.nix (e.g. mini-surround)
  2. Import plugin configuration in default.nix, in the lazy setup section of the extraLuaConfig part: { import = "lazyvim.plugins.extras.coding.mini-surround" }
  3. Optional: configure plugin in ./lua/plugins directory (e.g. mini-surround.lua)
  4. Rebuild your configuration

About

Simple template to get LazyVim started on Nix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published