Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

NixVim

Homepage: https://github.com/nix-community/nixvim

Maintainers: Noah Pierre Biewesch (@trueNAHO)


This module themes Neovim using the options provided by NixVim.

important

This module will have no effect unless the desired Nixvim module is properly installed and imported into your configuration.

Ensure you are configuring this module on the same platform (NixOS, Home Manager, Darwin) as where you installed Nixvim.

Standalone Mode

When using a NixOS or home-manager installation of NixVim, you can use Stylix as normal. However, when using Nixvim's "standalone" configuration mode, you will need to pass Stylix's generated config to Nixvim yourself.

The generated config can be accessed as config.lib.stylix.nixvim.config. You can use this as a module in your standalone Nixvim Configuration or an extension of it.

For example:

{
  inputs,
  config,
  pkgs,
  ...
}:
let
  inherit (pkgs.stdenv.hostPlatform) system;
  nixvim-package = inputs.nixvim-config.packages.${system}.default;
  extended-nixvim = nixvim-package.extend config.lib.stylix.nixvim.config;
in
{
  environment.systemPackages = [ extended-nixvim ];
}
  • Vim: themes Vim using the standard Home Manager options.
  • Neovim: themes Neovim using the standard Home Manager options.
  • nvf: themes Neovim using the options provided by nvf.

Home Manager options

stylix.targets.nixvim.enable

Whether to enable theming for nixvim

Type

boolean

Default

stylix.autoEnable

Example

false

Source

stylix.targets.nixvim.plugin

Plugin used for the colorscheme

Type

one of "base16-nvim", "mini.base16"

Default

"mini.base16"

Source

stylix.targets.nixvim.transparentBackground.main

Whether to enable background transparency for the main NeoVim window.

Type

boolean

Default

false

Example

true

Source

stylix.targets.nixvim.transparentBackground.numberLine

Whether to enable background transparency for the NeoVim number/relativenumber column.

Type

boolean

Default

false

Example

true

Source

stylix.targets.nixvim.transparentBackground.signColumn

Whether to enable background transparency for the NeoVim sign column.

Type

boolean

Default

false

Example

true

Source

NixOS options

stylix.targets.nixvim.enable

Whether to enable theming for nixvim

Type

boolean

Default

stylix.autoEnable

Example

false

Source

stylix.targets.nixvim.plugin

Plugin used for the colorscheme

Type

one of "base16-nvim", "mini.base16"

Default

"mini.base16"

Source

stylix.targets.nixvim.transparentBackground.main

Whether to enable background transparency for the main NeoVim window.

Type

boolean

Default

false

Example

true

Source

stylix.targets.nixvim.transparentBackground.numberLine

Whether to enable background transparency for the NeoVim number/relativenumber column.

Type

boolean

Default

false

Example

true

Source

stylix.targets.nixvim.transparentBackground.signColumn

Whether to enable background transparency for the NeoVim sign column.

Type

boolean

Default

false

Example

true

Source