diff options
Diffstat (limited to 'shared/home-manager/neovim/default.nix')
-rw-r--r-- | shared/home-manager/neovim/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/shared/home-manager/neovim/default.nix b/shared/home-manager/neovim/default.nix new file mode 100644 index 0000000..63a7564 --- /dev/null +++ b/shared/home-manager/neovim/default.nix @@ -0,0 +1,28 @@ +# This file contains the HM configuration options for Neovim. +{...}: { + imports = [ + ./completion.nix + ./editing-plugins.nix + ./lsp.nix + ]; + + programs.neovim = { + enable = true; + + # Import my existing config. I've been working on this for years and when + # my enthusiasm for Nix eventually dies off, I want to take it with me. + extraConfig = builtins.readFile ./init.vim; + + # Typing `vi`, `vim`, or `vimdiff` will also run neovim. + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + }; + + # Set Neovim as the default editor. + home.sessionVariables.EDITOR = "nvim"; + home.sessionVariables.VISUAL = "nvim"; + + # Use neovim as man pager. + home.sessionVariables.MANPAGER = "nvim +Man!"; +} |