</p></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-try-it-out"></a>Chapter1.Try it out</h1></div></div></div><p>Thanks to the portability of Nix, you can try out neovim-flake without actually installing it to your machine.
Below are the commands you may run to try out different configurations provided by this flake. As of v0.5, three
configurations are provided:</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem">
Nix
</li><liclass="listitem">
Tidal
</li><liclass="listitem">
Maximal
</li></ul></div><p>You may try out any of the provided configurations using the <codeclass="literal">nix run</code> command on a system where Nix is installed.</p><preclass="programlisting console">$ cachix use neovim-flake # Optional: it'll save you CPU resources and time
$ nix run github:notashelf/neovim-flake#nix # will run the default minimal configuration</pre><p>Do keep in mind that this is <spanclass="strong"><strong>susceptible to garbage collection</strong></span> meaning it will be removed from your Nix store
once you garbage collect. If you wish to install neovim-flake, please take a look at
<aclass="link"href="index.html#ch-custom-configuration"title="Chapter3.Custom Configuration">custom-configuration</a> or <aclass="link"href="index.html#ch-hm-module"title="Chapter6.Home Manager">home-manager</a> sections for installation
instructions.</p><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-using-prebuild-configs"></a>1.1.Using Prebuilt Configs</h2></div></div></div><preclass="programlisting console">$ nix run github:notashelf/neovim-flake#nix
$ nix run github:notashelf/neovim-flake#maximal</pre></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-available-configs"></a>1.2.Available Configs</h2></div></div></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="_nix"></a>1.2.1.Nix</h3></div></div></div><p><codeclass="literal">Nix</code> configuration by default provides LSP/diagnostic support for Nix alongisde a set of visual and functional plugins.
By running <codeclass="literal">nix run .</code>, which is the default package, you will build Neovim with this config.</p></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="_tidal"></a>1.2.2.Tidal</h3></div></div></div><p>Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.</p></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="_maximal"></a>1.2.3.Maximal</h3></div></div></div><p><codeclass="literal">Maximal</code> is the ultimate configuration that will enable support for more commonly used language as well as additional
complementary plugins. Keep in mind, however, that this will pull a lot of dependencies.</p><p>You are <spanclass="strong"><strong>strongly</strong></span> recommended to use the binary cache if you would like to try the Maximal configuration.</p></div></div></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-default-configs"></a>Chapter2.Default Configs</h1></div></div></div><p>While you can configure neovim-flake yourself using the builder, here are a few default configurations you can use.</p><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-default-tidal"></a>2.1.Tidal Cycles</h2></div></div></div><preclass="programlisting console">$ nix run github:notashelf/neovim-flake#tidal file.tidal</pre><p>Utilizing <aclass="link"href="https://github.com/tidalcycles/vim-tidal"target="_top">vim-tidal</a> and mitchmindtree’s fantastic <aclass="link"href="https://github.com/mitchmindtree/tidalcycles.nix"target="_top">tidalcycles.nix</a> start playing with tidal cycles in a single command.</p><p>In your tidal file, type a cycle e.g. <codeclass="literal">d1 $ s "drum"</code> and then press <spanclass="emphasis"><em>ctrl+enter</em></span>. Super collider with superdirt, and a modified GHCI with tidal will start up and begin playing. Note, you need jack enabled on your system. If you are using pipewire, its as easy as setting <codeclass="literal">services.pipewire.jack.enable = true</code>.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-default-nix"></a>2.2.Nix</h2></div></div></div><preclass="programlisting console">$ nix run github:notashelf/neovim-flake#nix test.nix</pre><p>Enables all the of neovim plugins, with language support for specifically Nix. This lets you see what a fully configured neovim setup looks like without downloading a whole bunch of language servers and associated tools.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-default-maximal"></a>2.3.Maximal</h2></div></div></div><preclass="programlisting console">$ nix shell github:notashelf/neovim-flake#maximal test.nix</pre><p>It is the same fully configured neovim as with the <aclass="link"href="index.html#sec-default-nix"title="2.2.Nix">Nix</a> config, but with every supported language enabled.</p><divclass="note"><h3class="title">Note</h3><p>Running the maximal config will download <spanclass="strong"><strong>a lot</strong></span> of packages as it is downloading language servers, formatters, and more.</p></div></div></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-custom-configuration"></a>Chapter3.Custom Configuration</h1></div></div></div><p>Custom configuration is done with the <codeclass="literal">neovimConfiguration</code> while using the flake as a standalone package.
It takes in the configuration as a module. The output of the configuration function is an attrset.</p><preclass="programlisting nix">{
}</pre><p>Your built neovim configuration can be exposed as a flake output, or be added to your system packages to make
it available across your system. You may also consider passing the flake output to home-manager to make it available
to a specific user <spanclass="strong"><strong>without</strong></span> using the home-manager module.</p></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-custom-package"></a>Chapter4.Custom Neovim Package</h1></div></div></div><p>As of v0.5, you may now specify the neovim package that will be wrapped with your configuration. This is done with the <codeclass="literal">vim.package</code> option.</p><preclass="programlisting nix">{inputs, pkgs, ...}: {
}</pre><p>The neovim-nightly-overlay always exposes an unwrapped package. If using a different source, you are highly recommended to get an "unwrapped" version of the neovim package,similar to <codeclass="literal">neovim-unwrapped</code> in nixpkgs.</p></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-custom-plugins"></a>Chapter5.Custom Plugins</h1></div></div></div><p>You can use custom plugins, before they are implemented in the flake.
To add a plugin, you need to add it to your config’s <codeclass="literal">config.vim.startPlugins</code> array.</p><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-new-method"></a>5.1.New Method</h2></div></div></div><p>As of version 0.5, we have a more extensive API for configuring plugins, under <codeclass="literal">vim.extraPlugins</code>.</p><p>Instead of using DAGs exposed by the library, you may use the extra plugin module as follows:</p><preclass="programlisting nix">{
}</pre></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-old-method"></a>5.2.Old Method</h2></div></div></div><p>Users who have not yet updated to 0.5, or prefer a more hands-on approach may use the old method where the load order
of the plugins is determined by DAGs.</p><preclass="programlisting nix">{
}</pre><p>Note: If your configuration needs to be put in a specific place in the config, you can use functions from
<codeclass="literal">inputs.neovim-flake.lib.nvim.dag</code> to order it.
Refer to <aclass="link"href="https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix"target="_top">https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix</a> to find out more about
the DAG system.</p><p>Also, if you successfully made your plugin work, please make a PR to add it to the flake, or open an issue
with your findings so that we can make it available for everyone easily.</p></div></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-hm-module"></a>Chapter6.Home Manager</h1></div></div></div><p>The Home Manager module allows us to customize the different <codeclass="literal">vim</code> options from inside the home-manager configuration
and it is the preferred way of configuring neovim-flake, both on NixOS and non-NixOS systems.</p><p>To use it, we first add the input flake.</p><preclass="programlisting nix">{
}</pre><divclass="note"><h3class="title">Note</h3><p>You may find all avaliable options in the <aclass="link"href="https://notashelf.github.io/neovim-flake/options"target="_top">appendix</a></p></div></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-languages"></a>Chapter7.Language Support</h1></div></div></div><p>Language specific support means there is a combination of language specific plugins, <codeclass="literal">treesitter</code> support, <codeclass="literal">nvim-lspconfig</code> language servers, and <codeclass="literal">null-ls</code> integration. This gets you capabilities ranging from autocompletion to formatting to diagnostics. The following languages have sections under the <codeclass="literal">vim.languages</code> attribute. See the configuration docs for details.</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem">
</li></ul></div><p>Adding support for more languages, and improving support for existing ones are great places
where you can contribute with a PR.</p><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="_lsp_custom_packages_command"></a>7.1.LSP Custom Packages/Command</h2></div></div></div><p>In any of the <codeclass="literal">opt.languages.<language>.lsp.package</code> options you can provide your own LSP package, or provide
the command to launch the language server, as a list of strings.</p><p>You can use this to skip automatic installation of a language server, and instead
use the one found in your <codeclass="literal">$PATH</code> during runtime, for example:</p><preclass="programlisting nix">vim.languages.java = {
}</pre></div></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-hacking"></a>Chapter8.Hacking neovim-flake</h1></div></div></div><p>neovim-flake is designed for developers as much as it is for the end user. I would like any potential contributor
to be able to propagate their desired changes into the repository without the extra effort. As such, below are guides
(and guidelines) to streamline the contribution process and ensure that your valuable input seamlessly integrates
into neovim-flake’s development without leaving question marks in your head.</p><p>This section is mainly directed towards those who wish to contribute code into neovim-flake. If you wish to instead
report a bug or discuss a potential feature implementation, first look among the already <aclass="link"href="https://github.com/notashelf/neovim-flake/issues"target="_top">open issues</a> and
if no matching issue exists you may open a <aclass="link"href="https://github.com/notashelf/neovim-flake/issues/new"target="_top">new issue</a> and describe your problem/request. While creating an
issue, please try to include as much information as you can, ideally also include relevant context in which an issue
occurs or a feature should be implemented.</p><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-contrib-getting-started"></a>8.1.Getting started</h2></div></div></div><p>You naturally would like to start by forking the repository. If you are new to git, have a look at GitHub’s
<aclass="link"href="https://help.github.com/articles/fork-a-repo/"target="_top">Fork a repo guide</a> for instructions on how you can do this. Once you have a fork of neovim-flake
you should create a branch starting at the most recent <codeclass="literal">main</code> branch.
Give your branch a reasonably descriptive name, suffixed by its type - i.e <codeclass="literal">feature/debugger</code> or <codeclass="literal">fix/pesky-bug</code>.</p><p>Implement your changes and commit them to the newly created branch and when you are happy with the result and positive
that it fulfills <aclass="xref"href="index.html#sec-guidelines"title="8.2.Guidelines">Section8.2, “Guidelines”</a>. Once you are confident everything is in order, push the branch to GitHub and</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-guidelines"></a>8.2.Guidelines</h2></div></div></div><p>If your contribution tightly follows the guidelines, then there is a good chance it will be merged without too much
trouble. Some of the guidelines will be strictly enforced, others will remain as gentle nudges towards the correct
direction. As we have no automated system enforcing those guidelines, please try to double check your changes before
making your pull request in order to avoid "faulty" code slipping by.</p><p>If you are uncertain how these rules affect the change you would like to make then feel free to start a
discussion in the <aclass="link"href="https://github.com/NotAShelf/neovim-flake/discussions"target="_top">discussions tab</a> ideally (but not necessarily) before you start developing.</p><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="sec-documentation"></a>8.2.1.Add adequate documentation</h3></div></div></div><p>Most, if not all, changes warrant changes to the documentation. Module options should be documented with
<aclass="link"href="https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup"target="_top">Nixpkgs-flavoured Markdown</a>, albeit with exceptions.
neovim-flake is itself documented using a combination of <aclass="link"href="https://tdg.docbook.org/"target="_top">DocBook</a> and <aclass="link"href="https://asciidoc.org/"target="_top">AsciiDoc</a> conventions.</p><p>The HTML version of this manual containing both the module option descriptions and the documentation of neovim-flake
(such as this page) can be generated and opened by typing the following in a shell within a clone of the
$ xdg-open ./result/share/doc/neovim-flake/index.html</pre></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="sec-guidelines-code-style"></a>8.2.2.Format your code</h3></div></div></div><p>Make sure your code is formatted as described in <aclass="xref"href="index.html#sec-code-style"title="8.2.5.Code Style">Section8.2.5, “Code Style”</a>. To maintain consistency throughout the project
you are encouraged to browse through existing code and adopt its style also in new code.</p></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="sec-guidelines-commit-message-style"></a>8.2.3.Format your commit messages</h3></div></div></div><p>Similar to <aclass="xref"href="index.html#sec-guidelines-code-style"title="8.2.2.Format your code">Section8.2.2, “Format your code”</a> we encourage a consistent commit message format as described
in <aclass="xref"href="index.html#sec-commit-style"title="8.2.4.Commits">Section8.2.4, “Commits”</a>.</p></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="sec-commit-style"></a>8.2.4.Commits</h3></div></div></div><p>The commits in your pull request should be reasonably self-contained. Which means each and every commit in
a pull request should make sense both on its own and in general context. That is, a second commit should not resolve
an issue that is introduced in an earlier commit. In particular, you will be asked to amend any commit that
introduces syntax errors or similar problems even if they are fixed in a later commit.</p><p>The commit messages should follow the <aclass="link"href="https://cbea.ms/git-commit/#seven-rules"target="_top">seven rules</a>, except for "Capitalize the subject line".
We also ask you to include the affected code component or module in the first line.
A commit message ideally, but not necessarily, follow the given template from home-manager’s own documentation</p><preclass="screen">{component}: {description}
{long description}</pre><p>where <codeclass="literal">{component}</code> refers to the code component (or module) your change affects, <codeclass="literal">{description}</code> is a very brief
description of your change, and <codeclass="literal">{long description}</code> is an optional clarifying description. As a rare exception, if
there is no clear component, or your change affects many components, then the <codeclass="literal">{component}</code> part is optional.
See <aclass="xref"href="index.html#ex-commit-message"title="Example8.1.Compliant commit message">Example8.1, “Compliant commit message”</a> for a commit message that fulfills these requirements.</p><divclass="example"><aid="ex-commit-message"></a><pclass="title"><strong>Example8.1.Compliant commit message</strong></p><divclass="example-contents"><p>The commit <aclass="link"href="https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef"target="_top">69f8e47e9e74c8d3d060ca22e18246b7f7d988ef</a> contains the commit message</p><preclass="screen">starship: allow running in Emacs if vterm is used
The vterm buffer is backed by libvterm and can handle Starship prompts
without issues.</pre></div></div><brclass="example-break"/><p>Long description can be ommitted if the change is too simple to warrant it. A minor fix in spelling or a formatting
change does not warrant long description, however, a module addition or removal does as you would like to provide the
relevant context for your changes.</p><p>Finally, when adding a new module, say <codeclass="literal">modules/foo.nix</code>, we use the fixed commit format <codeclass="literal">foo: add module</code>.
You can, of course, still include a long description if you wish.</p><p>In case of nested modules, i.e <codeclass="literal">modules/languages/java.nix</code> you are recommended to contain the parent as well - for
example <codeclass="literal">languages/java: some major change</code>.</p></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="sec-code-style"></a>8.2.5.Code Style</h3></div></div></div><p><spanclass="strong"><strong>Treewide</strong></span>
Keep lines at a reasonable width, ideally 80 characters or less. This also applies to string literals and module
descriptions and documentation.</p><p><spanclass="strong"><strong>Nix</strong></span>
neovim-flake is formatted by the <aclass="link"href="https://github.com/kamadorueda/alejandra"target="_top">alejandra</a> tool and the formatting is checked in the pull
request and push workflows. Run the <codeclass="literal">nix fmt</code> command inside the project repository before submitting your
pull request.</p><p>While Alejandra is mostly opinionated on how code looks after formatting, certain changes are done at the
user’s discretion based on how the original code was structured.</p><p>Please use one line code for attribute sets that contain only one subset.
For example:</p><preclass="programlisting nix"># parent modules should always be unfolded
module = {
value = mkEnableOption "some description" // { default = true; }; # merges can be done inline where possible
# same as parent modules, unfold submodules
subModule = {
# this is an option that contains more than one nested value
someOtherValue = mkOption {
type = lib.types.bool;
description = "Some other description"
default = true;
};
};
}</pre><p>If you move a line down after the merge operator, Alejandra will automatically unfold the whole merged attrset
for you, which we <spanclass="strong"><strong>do not</strong></span> want.</p><preclass="programlisting nix">module = {
key = mkEnableOption "some description" // {
default = true; # we want this to be inline
};
# ...
}</pre><p>For lists, it is mostly up to your own discretion how you want to format them, but please try to unfold lists if
they contain multiple items and especially if they are to include comments.</p><preclass="programlisting nix"># this is ok
singleItemList = [item1];</pre></div></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-testing"></a>8.3.Testing Your Changes</h2></div></div></div><p>Once you have made your changes, you will need to test them throughly. If it is a module, add your module option to
<codeclass="literal">configuration.nix</code> (located in the root of this project) inside <codeclass="literal">neovimConfiguration</code>. Enable it, and then run the
maximal configuration with <codeclass="literal">nix run .#maximal -Lv</code> to check for build errors. If neovim opens in the current directory
without any error messages (you can check the output of <codeclass="literal">:messages</code> inside neovim to see if there are any errors), then
your changes are good to go. Open your pull request, and it will be reviewed as soon as posssible.</p><p>If it is not a new module, but a change to an existing one, then make sure the module you have changed is enabled in the
maximal configuration by editing configuration.nix, and then run it with <codeclass="literal">nix run .#maximal -Lv</code>. Same procedure as
adding a new module will apply here.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-keybinds"></a>8.4.Keybinds</h2></div></div></div><p>As of 0.4, there exists an API for writing your own keybinds and a couple of useful utility functions are available in
the <aclass="link"href="https://github.com/NotAShelf/neovim-flake/tree/main/lib"target="_top">extended standard library</a>. The following section contains
a general overview to how you may utilize said functions.</p><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="sec-custom-key-mappings"></a>8.4.1.Custom Key Mappings Support for a Plugin</h3></div></div></div><p>To set a mapping, you should define it in <codeclass="literal">vim.maps.<<mode>></code>.
The available modes are:</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem">
normal
</li><liclass="listitem">
insert
</li><liclass="listitem">
select
</li><liclass="listitem">
visual
</li><liclass="listitem">
terminal
</li><liclass="listitem">
normalVisualOp
</li><liclass="listitem">
visualOnly
</li><liclass="listitem">
operator
</li><liclass="listitem">
insertCommand
</li><liclass="listitem">
lang
</li><liclass="listitem">
command
</li></ul></div><p>An example, simple keybinding, can look like this:</p><preclass="programlisting nix">{
vim.maps.normal = {
"<leader>wq" = {
action = ":wq<CR>";
silent = true;
desc = "Save file and quit";
};
};
}</pre><p>There are many settings available in the options. Please refer to the <aclass="link"href="https://notashelf.github.io/neovim-flake/options.html#opt-vim.maps.command._name_.action"target="_top">documentation</a> to see a list of them.</p><p><codeclass="literal">neovim-flake</code> provides a list of helper commands, so that you don’t have to write the mapping attribute sets every
<codeclass="literal">mkBinding = key: action: desc:</code> - makes a basic binding, with <codeclass="literal">silent</code> set to true.
</li><liclass="listitem">
<codeclass="literal">mkExprBinding = key: action: desc:</code> - makes an expression binding, with <codeclass="literal">lua</code>, <codeclass="literal">silent</code>, and <codeclass="literal">expr</code> set to true.
</li><liclass="listitem">
<codeclass="literal">mkLuaBinding = key: action: desc:</code> - makes an expression binding, with <codeclass="literal">lua</code>, and <codeclass="literal">silent</code> set to true.
</li></ul></div><p>Note that the Lua in these bindings is actual Lua, not pasted into a <codeclass="literal">:lua</code> command.
Therefore, you either pass in a function like <codeclass="literal">require('someplugin').some_function</code>, without actually calling it,
or you define your own function, like <codeclass="literal">function() require('someplugin').some_function() end</code>.</p><p>Additionally, to not have to repeat the descriptions, there’s another utility function with its own set of functions:</p><preclass="programlisting nix"># Utility function that takes two attrsets:
addDescriptionsToMappings = actualMappings: mappingDefinitions:</pre><p>This function can be used in combination with the same <codeclass="literal">mkBinding</code> functions as above, except they only take two
arguments - <codeclass="literal">binding</code> and <codeclass="literal">action</code>, and have different names:</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem">
<codeclass="literal">mkSetBinding = binding: action:</code> - makes a basic binding, with <codeclass="literal">silent</code> set to true.
</li><liclass="listitem">
<codeclass="literal">mkSetExprBinding = binding: action:</code> - makes an expression binding, with <codeclass="literal">lua</code>, <codeclass="literal">silent</code>, and <codeclass="literal">expr</code> set to true.
</li><liclass="listitem">
<codeclass="literal">mkSetLuaBinding = binding: action:</code> - makes an expression binding, with <codeclass="literal">lua</code>, and <codeclass="literal">silent</code> set to true.
</li></ul></div><p>You can read the source code of some modules to see them in action, but their usage should look something like this:</p><preclass="programlisting nix"># plugindefinition.nix
{lib, ...}:
with lib; {
options.vim.plugin = {
enable = mkEnableOption "Enable plugin";
# Mappings should always be inside an attrset called mappings
mappings = {
# mkMappingOption is a helper function from lib,
# that takes a description (which will also appear in which-key),
# and a default mapping (which can be null)
toggleCurrentLine = mkMappingOption "Toggle current line comment" "gcc";
toggleCurrentBlock = mkMappingOption "Toggle current block comment" "gbc";
toggleOpLeaderLine = mkMappingOption "Toggle line comment" "gc";
}</pre><divclass="note"><h3class="title">Note</h3><p>If you have come across a plugin that has an API that doesn’t seem to easily allow custom keybindings,
don’t be scared to implement a draft PR. We’ll help you get it done.</p></div></div></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-additional-plugins"></a>8.5.Adding Plugins</h2></div></div></div><p>To add a new neovim plugin, first add the source url in the inputs section of <codeclass="literal">flake.nix</code></p><preclass="programlisting nix">{
}</pre><p>Then add the name of the plugin into the <codeclass="literal">availablePlugins</code> variable in <codeclass="literal">lib/types/plugins.nix</code>:</p><preclass="programlisting nix"># ...
availablePlugins = [
# ...
"neodev-nvim"
];</pre><p>You can now reference this plugin using its string name:</p><preclass="programlisting nix">config.vim.startPlugins = ["neodev-nvim"];</pre></div></div></div><divclass="navfooter"><hr/><tablewidth="100%"summary="Navigation footer"><tr><tdwidth="40%"align="left"></td><tdwidth="20%"align="center"></td><tdwidth="40%"align="right"><aaccesskey="n"href="options.html">Next</a></td></tr><tr><tdwidth="40%"align="left"valign="top"></td><tdwidth="20%"align="center"></td><tdwidth="40%"align="right"valign="top">AppendixA.Configuration Options</td></tr></table></div></body></html>