Jump to content

Neovim: Difference between revisions

147 bytes added ,  23 January 2023
Restructure and cleanup
imported>Jooooscha
m (fix formatting)
imported>Onny
(Restructure and cleanup)
Line 1: Line 1:
__TOC__
[https://neovim.io Neovim] is a fork of [[Vim]] aiming to improve the codebase, allowing for easier implementation of APIs, improved user experience and plugin implementation.


== Installation and configuration ==
== Installation ==
 
Neovim shares most of its configuration with Vim. See the [[Vim|Vim page]] for more details on the use of both.


=== With Home Manager ===
=== With Home Manager ===
Line 18: Line 16:
More information about the module can be found here: [https://nix-community.github.io/home-manager/options.html#opt-programs.neovim.enable Home Manager Manual].
More information about the module can be found here: [https://nix-community.github.io/home-manager/options.html#opt-programs.neovim.enable Home Manager Manual].


==== Configuration ====
=== System-wide ===
 
If you do not use Home Manager, you can use the following code in your NixOS configuration:
 
  programs.neovim = {
    enable = true;
    defaultEditor = true;
  };
 
You can also manually add Neovim to your packages. This should only be used if the two version above do not work for you.
 
  environment.systemPackages = [ pkgs.neovim ];
 
== Configuration ==
 
=== With Home Manager ===
 
Neovim shares most of its configuration with Vim. See the [[Vim|Vim page]] for more details on the use of both.


The Home Manager module does not expose many configuration options.
The Home Manager module does not expose many configuration options. Therefore, the easiest way to get started is to use the [https://nix-community.github.io/home-manager/options.html#opt-programs.neovim.extraConfig extraConfig] option.
Therefore, the easiest way to get started is to use the [https://nix-community.github.io/home-manager/options.html#opt-programs.neovim.extraConfig extraConfig] option.
You can copy your old config or directly load your default Neovim config via:
You can copy your old config or directly load your default Neovim config via:


Line 56: Line 70:
In addition to the official packages, there are several user maintained repositories, such as [https://github.com/m15a/nixpkgs-vim-extra-plugins vim-extra-plugins] or [https://github.com/NixNeovim/NixNeovimPlugins NixNeovimPlugins].
In addition to the official packages, there are several user maintained repositories, such as [https://github.com/m15a/nixpkgs-vim-extra-plugins vim-extra-plugins] or [https://github.com/NixNeovim/NixNeovimPlugins NixNeovimPlugins].


=== Without Home Manager ===
=== With Home Manager ===
 
If you do not use Home Manager, you can use the following code in your NixOS configuration:
 
  programs.neovim = {
    enable = true;
    defaultEditor = true;
  };
 
==== Configuration ====


The NixOS module does not have an <code>extraConfig</code> option as the Home Manager module does.
The NixOS module does not have an <code>extraConfig</code> option as the Home Manager module does.
Line 82: Line 87:
   };
   };


=== Manually ===
== Build Neovim using Nix ==
 
You can also manually add Neovim to your packages. This should only be used if the two version above do not work for you.
 
  environment.systemPackages = [ pkgs.neovim ];
 
=== Build Neovim using Nix ===


You can also compile Neovim using nix. For this, the Neovim GitHub page has more information on this:
You can also compile Neovim using nix. For this, the Neovim GitHub page has more information on this:
Anonymous user