mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
deploy: a12a26e405
This commit is contained in:
parent
f162b5ebaa
commit
db9ed63149
6 changed files with 10423 additions and 5156 deletions
|
@ -1,8 +0,0 @@
|
||||||
pre {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code.hljs {
|
|
||||||
border: none;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
7
highlightjs/tomorrow-night.min.css
vendored
7
highlightjs/tomorrow-night.min.css
vendored
|
@ -1,7 +0,0 @@
|
||||||
/*!
|
|
||||||
Theme: Tomorrow Night
|
|
||||||
Author: Chris Kempson (http://chriskempson.com)
|
|
||||||
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
|
||||||
Maintainer: @highlightjs/core-team
|
|
||||||
Version: 2021.09.0
|
|
||||||
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#ccc;background:#2d2d2d}.hljs ::selection,.hljs::selection{background-color:#515151;color:#ccc}.hljs-comment{color:#999}.hljs-tag{color:#b4b7b4}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#ccc}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#f2777a}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#f99157}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#fc6}.hljs-strong{font-weight:700;color:#fc6}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#9c9}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#6cc}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#69c}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#c9c}.hljs-emphasis{color:#c9c;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
|
790
index.xhtml
790
index.xhtml
|
@ -4,18 +4,18 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>neovim-flake-manual</title>
|
<title>nvf manual</title>
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" /><link rel="stylesheet" type="text/css" href="highlightjs/tomorrow-night.min.css" /><link rel="stylesheet" type="text/css" href="highlightjs/highlight-style.css" />
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script>
|
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script>
|
||||||
<meta name="generator" content="nixos-render-docs" />
|
<meta name="generator" content="nixos-render-docs" />
|
||||||
<link rel="home" href="index.xhtml" title="neovim-flake-manual" />
|
<link rel="home" href="index.xhtml" title="nvf manual" />
|
||||||
<link rel="next" href="options.html" title="Appendix A. Neovim Flake Configuration Options" />
|
<link rel="next" href="options.html" title="Appendix A. Neovim Flake Configuration Options" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="navheader">
|
<div class="navheader">
|
||||||
<table width="100%" summary="Navigation header">
|
<table width="100%" summary="Navigation header">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3" align="center">neovim-flake-manual</th>
|
<th colspan="3" align="center">nvf manual</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="20%" align="left"> </td>
|
<td width="20%" align="left"> </td>
|
||||||
|
@ -28,30 +28,27 @@
|
||||||
<div class="book">
|
<div class="book">
|
||||||
<div class="titlepage">
|
<div class="titlepage">
|
||||||
<div>
|
<div>
|
||||||
<div><h1 class="title"><a id="neovim-flake-manual"></a>neovim-flake-manual</h1></div>
|
<div><h1 class="title"><a id="nvf-manual"></a>nvf manual</h1></div>
|
||||||
<div><h2 class="subtitle">Version release-v0.6</h2></div>
|
<div><h2 class="subtitle">Version v0.6</h2></div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="preface"> <a href="index.xhtml#sec-preface">Preface</a> </span></dt><dt> <span class="preface"> <a href="index.xhtml#ch-try-it-out">Try it out</a> </span></dt><dt> <span class="part"> <a href="index.xhtml#ch-custom-configuration">Custom Configuration</a> </span></dt><dt> <span class="part"> <a href="index.xhtml#ch-custom-package">Custom Neovim Package</a> </span></dt><dt> <span class="part"> <a href="index.xhtml#ch-custom-plugins">Custom Plugins</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-new-method">New Method</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-old-method">Old Method</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#configuring-plugins">Configuring</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-default-configs">Default Configs</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-default-maximal">Maximal</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-default-nix">Nix</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-default-tidal">Tidal Cycles</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-hm-module">Home Manager</a> </span></dt><dt> <span class="part"> <a href="index.xhtml#ch-languages">Language Support</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-languages-custom-lsp-packages">LSP Custom Packages/Command</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-hacking">Hacking neovim-flake</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting Started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-testing-changes">Testing Changes</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-keybinds">Keybinds</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-additional-plugins">Adding Plugins</a> </span></dt></dl></dd><dt> <span class="appendix"> <a href="options.html">A. Neovim Flake Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="release-notes.html">B. Release Notes</a> </span></dt> </dl></div>
|
<div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="preface"> <a href="index.xhtml#ch-preface">Preface</a> </span></dt><dt> <span class="preface"> <a href="index.xhtml#ch-try-it-out">Try it out</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-using-prebuild-configs">Using Prebuilt Configs</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-default-configs">Default Configs</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="index.xhtml#sec-default-maximal">Maximal</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#sec-default-nix">Nix</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-installation">Installing nvf</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-installation">Standalone Installation</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-nixos">Standalone Installation on NixOS</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-hm">Standalone Installation on Home-Manager</a> </span></dt></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-module-installation">Module Installation</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="index.xhtml#ch-nixos-module">NixOS Module</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#ch-hm-module">Home-Manager Module</a> </span></dt></dl></dd></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-configuring">Configuring nvf</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="index.xhtml#ch-custom-package">Custom Neovim Package</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#ch-custom-plugins">Custom Plugins</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#ch-adding-plugins">Adding Plugins</a> </span></dt></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-languages">Language Support</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-languages-custom-lsp-packages">LSP Custom Packages/Command</a> </span></dt></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-using-dags">Using DAGs</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entryAnywhere">entryAnywhere</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#ch-types-dag-entryAfter">entryAfter</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#ch-types-dag-entryBefore">entryBefore</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entryBetween">entryBetween</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesAnywhere">entriesAnywhere</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesAfter">entriesAfter</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesBefore">entriesBefore</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesBetween">entriesBetween</a> </span></dt></dl></dd></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-hacking">Hacking nvf</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting Started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-testing-changes">Testing Changes</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-keybinds">Keybinds</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-additional-plugins">Adding Plugins</a> </span></dt></dl></dd><dt> <span class="appendix"> <a href="options.html">A. Neovim Flake Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="release-notes.html">B. Release Notes</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.1">Release 0.1</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.2">Release 0.2</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.3">Release 0.3</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.4">Release 0.4</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.5">Release 0.5</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.6">Release 0.6</a> </span></dt></dl></dd> </dl></div>
|
||||||
<div class="preface"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="sec-preface"></a>Preface </h1> </div> </div></div><p>If you noticed a bug caused by neovim-flake then please consider reporting it over
|
<div class="preface"> <div class="titlepage"> <div> <div> <h1 id="ch-preface" class="title" >Preface </h1> </div> </div></div><p>If you noticed a bug caused by <span class="strong"><strong>nvf</strong></span> then please consider reporting it over
|
||||||
<a class="link" href="https://github.com/notashelf/neovim-flake/issues" target="_top">the neovim-flake issue tracker</a>.
|
<a class="link" href="https://github.com/notashelf/nvf/issues" target="_top">the issue tracker</a>.</p><p>Bugfixes, feature additions and upstreamed changes from your local configurations
|
||||||
Bugfixes, feature additions and upstreamed changes are welcome over
|
are always welcome in the <a class="link" href="https://github.com/notashelf/nvf/pulls" target="_top">the pull requests tab</a>.</p>
|
||||||
<a class="link" href="https://github.com/notashelf/neovim-flake/pulls" target="_top">the neovim-flake pull requests tab</a>.</p>
|
</div><div class="preface"> <div class="titlepage"> <div> <div> <h1 id="ch-try-it-out" class="title" >Try it out </h1> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-using-prebuild-configs">Using Prebuilt Configs</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-available-configs">Available Configs</a> </span></dt></dl></dd> </dl></div><p>Thanks to the portability of Nix, you can try out nvf without actually installing it to your machine.
|
||||||
</div><div class="preface"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-try-it-out"></a>Try it out </h1> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-using-prebuild-configs">Using Prebuilt Configs</a> </span></dt> </dl></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
|
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><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Nix</p></li><li class="listitem"><p>Tidal</p></li><li class="listitem"><p>Maximal</p></li></ul></div><p>You may try out any of the provided configurations using the <code class="literal">nix run</code> command on a system where Nix is installed.</p><pre><code class="programlisting console">$ cachix use neovim-flake # Optional: it'll save you CPU resources and time
|
configurations are provided:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Nix</p></li><li class="listitem"><p>Tidal</p></li><li class="listitem"><p>Maximal</p></li></ul></div><p>You may try out any of the provided configurations using the <code class="literal">nix run</code> command on a system where Nix is installed.</p><pre><code class="programlisting console">$ cachix use nvf # Optional: it'll save you CPU resources and time
|
||||||
$ nix run github:notashelf/neovim-flake#nix # will run the default minimal configuration
|
$ nix run github:notashelf/nvf#nix # will run the default minimal configuration
|
||||||
</code></pre><p>Do keep in mind that this is <span class="strong"><strong>susceptible to garbage collection</strong></span> meaning it will be removed from your Nix store
|
</code></pre><p>Do keep in mind that this is <span class="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
|
once you garbage collect.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-using-prebuild-configs" class="title" >Using Prebuilt Configs </h2> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-available-configs">Available Configs</a> </span></dt> </dl></div><pre><code class="programlisting console">$ nix run github:notashelf/nvf#nix
|
||||||
<a class="link" href="index.xhtml#ch-custom-configuration" title="Custom Configuration" >custom-configuration</a> or <a class="link" href="index.xhtml#ch-hm-module" title="Home Manager" >home-manager</a> sections for installation
|
$ nix run github:notashelf/nvf#tidal
|
||||||
instructions.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" > <a id="sec-using-prebuild-configs"></a>Using Prebuilt Configs </h2> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-available-configs">Available Configs</a> </span></dt> </dl></div><pre><code class="programlisting console">$ nix run github:notashelf/neovim-flake#nix
|
$ nix run github:notashelf/nvf#maximal
|
||||||
$ nix run github:notashelf/neovim-flake#tidal
|
</code></pre><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-available-configs" class="title" >Available Configs </h3> </div> </div></div><div class="section"> <div class="titlepage"> <div> <div> <h4 id="sec-configs-nix" class="title" >Nix </h4> </div> </div></div><p><code class="literal">Nix</code> configuration by default provides LSP/diagnostic support for Nix alongisde a set of visual and functional plugins.
|
||||||
$ nix run github:notashelf/neovim-flake#maximal
|
By running <code class="literal">nix run .#</code>, which is the default package, you will build Neovim with this config.</p>
|
||||||
</code></pre><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-available-configs"></a>Available Configs </h3> </div> </div></div><div class="section"> <div class="titlepage"> <div> <div> <h4 class="title" > <a id="sec-configs-nix"></a>Nix </h4> </div> </div></div><p><code class="literal">Nix</code> configuration by default provides LSP/diagnostic support for Nix alongisde a set of visual and functional plugins.
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h4 id="sec-configs-tidal" class="title" >Tidal </h4> </div> </div></div><p>Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.</p>
|
||||||
By running <code class="literal">nix run .</code>, which is the default package, you will build Neovim with this config.</p>
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h4 id="sec-configs-maximal" class="title" >Maximal </h4> </div> </div></div><p><code class="literal">Maximal</code> is the ultimate configuration that will enable support for more commonly used language as well as additional
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h4 class="title" > <a id="sec-configs-tidal"></a>Tidal </h4> </div> </div></div><p>Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.</p>
|
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h4 class="title" > <a id="sec-configs-maximal"></a>Maximal </h4> </div> </div></div><p><code class="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 <span class="emphasis"><em>strongly</em></span> recommended to use the binary cache if you would like to try the Maximal configuration.</p>
|
complementary plugins. Keep in mind, however, that this will pull a lot of dependencies.</p><p>You are <span class="emphasis"><em>strongly</em></span> recommended to use the binary cache if you would like to try the Maximal configuration.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -59,38 +56,58 @@ complementary plugins. Keep in mind, however, that this will pull a lot of depen
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-custom-configuration"></a>Custom Configuration </h1> </div> </div></div><div class="partintro"><p>Custom configuration is done with the <code class="literal">neovimConfiguration</code> while using the flake as a standalone package.
|
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 id="ch-default-configs" class="title" >Default Configs </h1> </div> </div></div><div class="partintro"><p>While you can configure <span class="strong"><strong>nvf</strong></span> yourself using the builder, you can also use the pre-built configs that are available.
|
||||||
It takes in the configuration as a module. The output of the configuration function is an attrset.</p><pre><code class="programlisting nix">{
|
Here are a few default configurations you can use.</p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="chapter"> <a href="index.xhtml#sec-default-maximal">Maximal</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#sec-default-nix">Nix</a> </span></dt> </dl></div></div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-default-maximal" class="title" >Maximal </h2> </div> </div></div><pre><code class="programlisting bash">$ nix shell github:notashelf/nvf#maximal test.nix
|
||||||
|
</code></pre><p>It is the same fully configured Neovim as with the <a class="link" href="index.xhtml#sec-default-nix" title="Nix" >Nix</a>
|
||||||
|
configuration, but with every supported language enabled.</p><div class="note"><h3 class="title">Note</h3><p>Running the maximal config will download <span class="emphasis"><em>a lot</em></span> of packages as it is
|
||||||
|
downloading language servers, formatters, and more.</p></div>
|
||||||
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-default-nix" class="title" >Nix </h2> </div> </div></div><pre><code class="programlisting bash">$ nix run github:notashelf/nvf#nix test.nix
|
||||||
|
</code></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>
|
||||||
|
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 id="ch-installation" class="title" >Installing nvf </h1> </div> </div></div><div class="partintro"><p>There are multiple ways of installing nvf on your system. You may either choose
|
||||||
|
the standalone installation method, which does not depend on a module system and may
|
||||||
|
be done on any system that has the Nix package manager or the appropriate modules
|
||||||
|
for NixOS and home-manager as described in the <a class="link" href="index.xhtml#ch-module-installation" title="Module Installation" >module installation section</a></p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-installation">Standalone Installation</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-nixos">Standalone Installation on NixOS</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-hm">Standalone Installation on Home-Manager</a> </span></dt></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-module-installation">Module Installation</a> </span></dt><dd><dl><dt> <span class="chapter"> <a href="index.xhtml#ch-nixos-module">NixOS Module</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#ch-hm-module">Home-Manager Module</a> </span></dt></dl></dd> </dl></div></div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-standalone-installation" class="title" >Standalone Installation </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-nixos">Standalone Installation on NixOS</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#ch-standalone-hm">Standalone Installation on Home-Manager</a> </span></dt> </dl></div><p>It is possible to install <span class="strong"><strong>nvf</strong></span> without depending on NixOS or home-manager as the parent
|
||||||
|
module system, using the <code class="literal">neovimConfiguration</code> function exposed by <span class="strong"><strong>nvf</strong></span> extended library.
|
||||||
|
It takes in the configuration as a module, and returns an attribute set as a result.</p><pre><code class="programlisting nix">{
|
||||||
options = "The options that were available to configure";
|
options = "The options that were available to configure";
|
||||||
config = "The outputted configuration";
|
config = "The outputted configuration";
|
||||||
pkgs = "The package set used to evaluate the module";
|
pkgs = "The package set used to evaluate the module";
|
||||||
neovim = "The built neovim package";
|
neovim = "The built neovim package";
|
||||||
}
|
}
|
||||||
</code></pre><p>The following is an example of a barebones vim configuration with the default theme enabled.</p><pre><code class="programlisting nix">{
|
</code></pre><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-standalone-nixos" class="title" >Standalone Installation on NixOS </h2> </div> </div></div><p>Your built Neoevim configuration can be exposed as a flake output to make it
|
||||||
inputs.neovim-flake = {
|
easier to share across machines, repositories and so on. Or it can be added to
|
||||||
url = "github:notashelf/neovim-flake";
|
your system packages to make it available across your system.</p><p>The following is an example installation of <code class="literal">nvf</code> as a standalone package with
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
the default theme enabled. You may use other options inside <code class="literal">config.vim</code> in
|
||||||
|
<code class="literal">configModule</code>, but this example will not cover that.</p><pre><code class="programlisting nix">{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
nvf.url = "github:notashelf/nvf";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {nixpkgs, neovim-flake, ...}: let
|
outputs = {nixpkgs, nvf, ...}: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
configModule = {
|
configModule = {
|
||||||
# Add any custom options (and feel free to upstream them!)
|
# Add any custom options (and do feel free to upstream them!)
|
||||||
# options = ...
|
# options = { ... };
|
||||||
|
|
||||||
config.vim = {
|
config.vim = {
|
||||||
theme.enable = true;
|
theme.enable = true;
|
||||||
|
# and more options as you see fit...
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
customNeovim = neovim-flake.lib.neovimConfiguration {
|
customNeovim = nvf.lib.neovimConfiguration {
|
||||||
modules = [configModule];
|
modules = [configModule];
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
# this will make the package available as a flake input
|
# this will make the package available as a flake input
|
||||||
packages.${system}.neovim = customNeovim.neovim;
|
packages.${system}.my-neovim = customNeovim.neovim;
|
||||||
|
|
||||||
# this is an example nixosConfiguration using the built neovim package
|
# this is an example nixosConfiguration using the built neovim package
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
@ -107,16 +124,214 @@ It takes in the configuration as a module. The output of the configuration funct
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</code></pre><p>Your built neovim configuration can be exposed as a flake output, or be added to your system packages to make
|
</code></pre>
|
||||||
it available across your system. You may also consider passing the flake output to home-manager to make it available
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-standalone-hm" class="title" >Standalone Installation on Home-Manager </h2> </div> </div></div><p>Your built Neoevim configuration can be exposed as a flake output to make it
|
||||||
to a specific user <span class="emphasis"><em>without</em></span> using the home-manager module.</p></div>
|
easier to share across machines, repositories and so on. Or it can be added to
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-custom-package"></a>Custom Neovim Package </h1> </div> </div></div><div class="partintro"><p>As of v0.5, you may now specify the neovim package that will be wrapped with your configuration. This is done with the <code class="literal">vim.package</code> option.</p><pre><code class="programlisting nix">{inputs, pkgs, ...}: {
|
your system packages to make it available across your system.</p><p>The following is an example installation of <code class="literal">nvf</code> as a standalone package with
|
||||||
# using the neovim-nightly overlay
|
the default theme enabled. You may use other options inside <code class="literal">config.vim</code> in
|
||||||
config.vim.package = inputs.neovim-overlay.packages.${pkgs.system}.neovim;
|
<code class="literal">configModule</code>, but this example will not cover that.</p><pre><code class="programlisting nix">{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
nvf.url = "github:notashelf/nvf";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {nixpkgs, home-manager, nvf, ...}: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
configModule = {
|
||||||
|
# Add any custom options (and do feel free to upstream them!)
|
||||||
|
# options = { ... };
|
||||||
|
|
||||||
|
config.vim = {
|
||||||
|
theme.enable = true;
|
||||||
|
# and more options as you see fit...
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
customNeovim = nvf.lib.neovimConfiguration {
|
||||||
|
modules = [configModule];
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
# this will make the package available as a flake input
|
||||||
|
packages.${system}.my-neovim = customNeovim.neovim;
|
||||||
|
|
||||||
|
# this is an example home-manager configuration
|
||||||
|
# using the built neovim package
|
||||||
|
homeConfigurations = {
|
||||||
|
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
# ...
|
||||||
|
modules = [
|
||||||
|
./home.nix
|
||||||
|
|
||||||
|
# this will make wrapped neovim available in your system packages
|
||||||
|
{environment.systemPackages = [customNeovim.neovim];}
|
||||||
|
];
|
||||||
|
# ...
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
</code></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 <code class="literal">neovim-unwrapped</code> in nixpkgs.</p></div>
|
</code></pre>
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-custom-plugins"></a>Custom Plugins </h1> </div> </div></div><div class="partintro"><p>You can use custom plugins, before they are implemented in the flake.
|
</div>
|
||||||
To add a plugin, you need to add it to your config’s <code class="literal">config.vim.startPlugins</code> array.</p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-new-method">New Method</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-old-method">Old Method</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#configuring-plugins">Configuring</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-new-method"></a>New Method </h2> </div> </div></div><p>As of version 0.5, we have a more extensive API for configuring plugins, under <code class="literal">vim.extraPlugins</code>.</p><p>Instead of using DAGs exposed by the library, you may use the extra plugin module as follows:</p><pre><code class="programlisting nix">{
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-module-installation" class="title" >Module Installation </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="chapter"> <a href="index.xhtml#ch-nixos-module">NixOS Module</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-example-installation-nixos">Example Installation</a> </span></dt></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-hm-module">Home-Manager Module</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-example-installation-hm">Example Installation</a> </span></dt></dl></dd> </dl></div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-nixos-module" class="title" >NixOS Module </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-example-installation-nixos">Example Installation</a> </span></dt> </dl></div><p>The NixOS module allows us to customize the different <code class="literal">vim</code> options from inside
|
||||||
|
the NixOS configuration without having to call for the wrapper yourself. It is
|
||||||
|
the recommended way to use <span class="strong"><strong>nvf</strong></span> alongside the home-manager module depending
|
||||||
|
on your needs.</p><p>To use it, we first add the input flake.</p><pre><code class="programlisting nix">{
|
||||||
|
inputs = {
|
||||||
|
obsidian-nvim.url = "github:epwalsh/obsidian.nvim";
|
||||||
|
nvf = {
|
||||||
|
url = "github:notashelf/nvf";
|
||||||
|
# you can override input nixpkgs
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# you can also override individual plugins
|
||||||
|
# for example:
|
||||||
|
inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><p>Followed by importing the NixOS module somewhere in your configuration.</p><pre><code class="programlisting nix">{
|
||||||
|
# assuming nvf is in your inputs and inputs is in the argset
|
||||||
|
# see example below
|
||||||
|
imports = [ inputs.nvf.nixosModules.default ];
|
||||||
|
}
|
||||||
|
</code></pre><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-example-installation-nixos" class="title" style="clear: both">Example Installation </h2> </div> </div></div><pre><code class="programlisting nix">{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
nvf.url = "github:notashelf/nvf";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, nvf, ... }: let
|
||||||
|
system = "x86_64-linux"; in {
|
||||||
|
# ↓ this is your host output in the flake schema
|
||||||
|
nixosConfigurations."yourUsername»" = nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
nvf.nixosModules.default # <- this imports the NixOS module that provides the options
|
||||||
|
./configuration.nix # <- your host entrypoint
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><p>Once the module is properly imported by your host, you will be able to use the
|
||||||
|
<code class="literal">programs.nvf</code> module option anywhere in your configuration in order to
|
||||||
|
configure <span class="strong"><strong>nvf</strong></span>.</p><pre><code class="programlisting nix{"> programs.nvf = {
|
||||||
|
enable = true;
|
||||||
|
# your settings need to go into the settings attribute set
|
||||||
|
# most settings are documented in the appendix
|
||||||
|
settings = {
|
||||||
|
vim.viAlias = false;
|
||||||
|
vim.vimAlias = true;
|
||||||
|
vim.lsp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><div class="note"><h3 class="title">Note</h3><p><span class="strong"><strong>nvf</strong></span> exposes a lot of options, most of which are not referenced in the
|
||||||
|
installation sections of the manual. You may find all avaliable options
|
||||||
|
in the <a class="link" href="https://notashelf.github.io/nvf/options" target="_top">appendix</a></p></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-hm-module" class="title" >Home-Manager Module </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-example-installation-hm">Example Installation</a> </span></dt> </dl></div><p>The home-manager module allows us to customize the different <code class="literal">vim</code> options from
|
||||||
|
inside the home-manager configuration without having to call for the wrapper
|
||||||
|
yourself. It is the recommended way to use <span class="strong"><strong>nvf</strong></span> alongside the NixOS module
|
||||||
|
depending on your needs.</p><p>To use it, we first add the input flake.</p><pre><code class="programlisting nix">{
|
||||||
|
inputs = {
|
||||||
|
obsidian-nvim.url = "github:epwalsh/obsidian.nvim";
|
||||||
|
nvf = {
|
||||||
|
url = "github:notashelf/nvf";
|
||||||
|
# you can override input nixpkgs
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# you can also override individual plugins
|
||||||
|
# for example:
|
||||||
|
inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><p>Followed by importing the home-manager module somewhere in your configuration.</p><pre><code class="programlisting nix">{
|
||||||
|
# assuming nvf is in your inputs and inputs is in the argset
|
||||||
|
# see example below
|
||||||
|
imports = [ inputs.nvf.homeManagerModules.default ];
|
||||||
|
}
|
||||||
|
</code></pre><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-example-installation-hm" class="title" style="clear: both">Example Installation </h2> </div> </div></div><pre><code class="programlisting nix">{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
nvf.url = "github:notashelf/nvf";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, home-manager, nvf, ... }: let
|
||||||
|
system = "x86_64-linux"; in {
|
||||||
|
# ↓ this is your home output in the flake schema, expected by home-manager
|
||||||
|
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration
|
||||||
|
modules = [
|
||||||
|
nvf.homeManagerModules.default # <- this imports the home-manager module that provides the options
|
||||||
|
./home.nix # <- your home entrypoint
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><p>Once the module is properly imported by your host, you will be able to use the
|
||||||
|
<code class="literal">programs.nvf</code> module option anywhere in your configuration in order to
|
||||||
|
configure <span class="strong"><strong>nvf</strong></span>.</p><pre><code class="programlisting nix{"> programs.nvf = {
|
||||||
|
enable = true;
|
||||||
|
# your settings need to go into the settings attribute set
|
||||||
|
# most settings are documented in the appendix
|
||||||
|
settings = {
|
||||||
|
vim.viAlias = false;
|
||||||
|
vim.vimAlias = true;
|
||||||
|
vim.lsp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><div class="note"><h3 class="title">Note</h3><p><span class="strong"><strong>nvf</strong></span> exposes a lot of options, most of which are not referenced in the
|
||||||
|
installation sections of the manual. You may find all avaliable options
|
||||||
|
in the <a class="link" href="https://notashelf.github.io/nvf/options" target="_top">appendix</a></p></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 id="ch-configuring" class="title" >Configuring nvf </h1> </div> </div></div><div class="partintro"><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="chapter"> <a href="index.xhtml#ch-custom-package">Custom Neovim Package</a> </span></dt><dt> <span class="chapter"> <a href="index.xhtml#ch-custom-plugins">Custom Plugins</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#ch-adding-plugins">Adding Plugins</a> </span></dt></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-languages">Language Support</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-languages-custom-lsp-packages">LSP Custom Packages/Command</a> </span></dt></dl></dd><dt> <span class="chapter"> <a href="index.xhtml#ch-using-dags">Using DAGs</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entryAnywhere">entryAnywhere</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#ch-types-dag-entryAfter">entryAfter</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#ch-types-dag-entryBefore">entryBefore</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entryBetween">entryBetween</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesAnywhere">entriesAnywhere</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesAfter">entriesAfter</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesBefore">entriesBefore</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesBetween">entriesBetween</a> </span></dt></dl></dd> </dl></div></div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-custom-package" class="title" >Custom Neovim Package </h2> </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 <code class="literal">vim.package</code> option.</p><pre><code class="programlisting nix">{inputs, pkgs, ...}: {
|
||||||
|
# using the neovim-nightly overlay
|
||||||
|
vim.package = inputs.neovim-overlay.packages.${pkgs.system}.neovim;
|
||||||
|
}
|
||||||
|
</code></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 <code class="literal">neovim-unwrapped</code> in nixpkgs.</p><pre><code class="programlisting nix">{ pkgs, ...}: {
|
||||||
|
# using the neovim-nightly overlay
|
||||||
|
vim.package = pkgs.neovim-unwrapped;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-custom-plugins" class="title" >Custom Plugins </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#ch-adding-plugins">Adding Plugins</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-configuring-plugins">Configuring</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-new-method">New Method</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-old-method">Old Method</a> </span></dt></dl></dd> </dl></div><p><span class="strong"><strong>nvf</strong></span>, by default, exposes a wide variety of plugins as module options
|
||||||
|
for your convience and bundles necessary dependencies into <span class="strong"><strong>nvf</strong></span>’s runtime.
|
||||||
|
In case a plugin is not available in <span class="strong"><strong>nvf</strong></span>, you may consider making a pull
|
||||||
|
request to <span class="strong"><strong>nvf</strong></span> to include it as a module or you may add it to your
|
||||||
|
configuration locally.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="ch-adding-plugins" class="title" style="clear: both">Adding Plugins </h2> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-configuring-plugins">Configuring</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-new-method">New Method</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-old-method">Old Method</a> </span></dt> </dl></div><p>There are multiple ways of adding custom plugins to your <span class="strong"><strong>nvf</strong></span> configuration.</p><p>You can use custom plugins, before they are implemented in the flake. To add a
|
||||||
|
plugin to the runtime, you need to add it to the <code class="literal">vim.startPlugins</code> list in
|
||||||
|
your configuration.</p><p>Adding a plugin to <code class="literal">startPlugins</code> will not allow you to configure the plugin
|
||||||
|
that you have adeed, but <span class="strong"><strong>nvf</strong></span> provides multiple way of configuring any
|
||||||
|
custom plugins that you might have added to your configuration.</p><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-configuring-plugins" class="title" >Configuring </h3> </div> </div></div><p>Just making the plugin to your Neovim configuration available might not always
|
||||||
|
be enough. In that case, you can write custom vimscript or lua config, using
|
||||||
|
either <code class="literal">config.vim.configRC</code> or <code class="literal">config.vim.luaConfigRC</code> respectively. Both of
|
||||||
|
these options are attribute sets, and you need to give the configuration you’re
|
||||||
|
adding some name, like this:</p><pre><code class="programlisting nix">{
|
||||||
|
# this will create an "aquarium" section in your init.vim with the contents of your custom config
|
||||||
|
# which will be *appended* to the rest of your configuration, inside your init.vim
|
||||||
|
config.vim.configRC.aquarium = "colorscheme aquiarum";
|
||||||
|
}
|
||||||
|
</code></pre><div class="note"><h3 class="title">Note</h3><p>If your configuration needs to be put in a specific place in the config, you
|
||||||
|
can use functions from <code class="literal">inputs.nvf.lib.nvim.dag</code> to order it. Refer to
|
||||||
|
https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix
|
||||||
|
to find out more about the DAG system.</p></div><p>If you successfully made your plugin work, please feel free to create a PR to
|
||||||
|
add it to <span class="strong"><strong>nvf</strong></span> or open an issue with your findings so that we can make it
|
||||||
|
available for everyone easily.</p>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-new-method" class="title" >New Method </h3> </div> </div></div><p>As of version <span class="strong"><strong>0.5</strong></span>, we have a more extensive API for configuring plugins,
|
||||||
|
under <code class="literal">vim.extraPlugins</code>. Instead of using DAGs exposed by the library, you may
|
||||||
|
use the extra plugin module as follows:</p><pre><code class="programlisting nix">{
|
||||||
config.vim.extraPlugins = with pkgs.vimPlugins; {
|
config.vim.extraPlugins = with pkgs.vimPlugins; {
|
||||||
aerial = {
|
aerial = {
|
||||||
package = aerial-nvim;
|
package = aerial-nvim;
|
||||||
|
@ -135,163 +350,221 @@ To add a plugin, you need to add it to your config’s <code class="literal">con
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-old-method"></a>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
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-old-method" class="title" >Old Method </h3> </div> </div></div><p>Prior to version 0.5, the method of adding new plugins was adding the plugin
|
||||||
of the plugins is determined by DAGs.</p><pre><code class="programlisting nix">{
|
package to <code class="literal">vim.startPlugins</code> and add its configuration as a DAG under one of
|
||||||
# fetch plugin source from GitHub and add it to startPlugins
|
<code class="literal">vim.configRC</code> or <code class="literal">vim.luaConfigRC</code>. Users who have not yet updated to 0.5, or
|
||||||
config.vim.startPlugins = [
|
prefer a more hands-on approach may use the old method where the load order of
|
||||||
(pkgs.fetchFromGitHub {
|
the plugins is determined by DAGs.</p><div class="section"> <div class="titlepage"> <div> <div> <h4 id="sec-adding-plugins" class="title" >Adding plugins </h4> </div> </div></div><p>To add a plugin to <span class="strong"><strong>nvf</strong></span>’s runtime, you may add it</p><pre><code class="programlisting nix">{pkgs, ...}: {
|
||||||
owner = "FrenzyExists";
|
# add a package from nixpkgs to startPlugins
|
||||||
repo = "aquarium-vim";
|
vim.startPlugins = [
|
||||||
rev = "d09b1feda1148797aa5ff0dbca8d8e3256d028d5";
|
pkgs.vimPlugins.aerial-nvim ];
|
||||||
sha256 = "CtyEhCcGxxok6xFQ09feWpdEBIYHH+GIFVOaNZx10Bs=";
|
}
|
||||||
})
|
</code></pre><p>And to configure the added plugin, you can use the <code class="literal">luaConfigRC</code> option to
|
||||||
];
|
provide configuration as a DAG using the <span class="strong"><strong>nvf</strong></span> extended library.</p><pre><code class="programlisting nix">{inputs, ...}: let
|
||||||
|
# assuming you have an input called nvf pointing at the nvf repository
|
||||||
|
inherit (inputs.nvf.lib.nvim.dag) entryAnywhere;
|
||||||
|
in {
|
||||||
|
vim.luaConfigRC.aerial-nvim= entryAnywhere ''
|
||||||
|
require('aerial').setup {
|
||||||
|
-- your configuration here
|
||||||
|
}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="configuring-plugins"></a>Configuring </h2> </div> </div></div><p>Just making the plugin to your neovim configuration available might not always be enough.
|
|
||||||
In that case, you can write custom vimscript or lua config, using <code class="literal">config.vim.configRC</code> or <code class="literal">config.vim.luaConfigRC</code>
|
|
||||||
respectively. These options are attribute sets, and you need to give the configuration you’re adding some name, like this:</p><pre><code class="programlisting nix">{
|
|
||||||
# this will create an "aquarium" section in your init.vim with the contents of your custom config
|
|
||||||
# which will be *appended* to the rest of your configuration, inside your init.vim
|
|
||||||
config.vim.configRC.aquarium = "colorscheme aquiarum";
|
|
||||||
}
|
|
||||||
</code></pre><div class="note"><h3 class="title">Note</h3><p>If your configuration needs to be put in a specific place in the config, you can use functions from
|
|
||||||
<code class="literal">inputs.neovim-flake.lib.nvim.dag</code> to order it.
|
|
||||||
Refer to https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix to find out more about
|
|
||||||
the DAG system.</p></div><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>
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-default-configs"></a>Default Configs </h1> </div> </div></div><div class="partintro"><p>While you can configure neovim-flake yourself using the builder, you can also use the pre-built configs that are available.
|
|
||||||
Here are a few default configurations you can use.</p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-default-maximal">Maximal</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-default-nix">Nix</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-default-tidal">Tidal Cycles</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-default-maximal"></a>Maximal </h2> </div> </div></div><pre><code class="programlisting bash">$ nix shell github:notashelf/neovim-flake#maximal test.nix
|
</div>
|
||||||
</code></pre><p>It is the same fully configured neovim as with the <a class="link" href="index.xhtml#sec-default-nix" title="Nix" >Nix</a> config, but with every supported language enabled.</p><div class="note"><h3 class="title">Note</h3><p>Running the maximal config will download <span class="emphasis"><em>a lot</em></span> of packages as it is downloading language servers, formatters, and more.</p></div>
|
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-default-nix"></a>Nix </h2> </div> </div></div><pre><code class="programlisting bash">$ nix run github:notashelf/neovim-flake#nix test.nix
|
|
||||||
</code></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><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-default-tidal"></a>Tidal Cycles </h2> </div> </div></div><pre><code class="programlisting bash">$ nix run github:notashelf/neovim-flake#tidal file.tidal
|
|
||||||
</code></pre><p>Utilizing <a class="link" href="https://github.com/tidalcycles/vim-tidal" target="_top">vim-tidal</a> and mitchmindtree’s fantastic
|
|
||||||
<a class="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. <code class="literal">d1 $ s "drum"</code> and then press <span class="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 <code class="literal">services.pipewire.jack.enable = true</code> in your configuration.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-hm-module"></a>Home Manager </h1> </div> </div></div><div class="partintro"><p>The Home Manager module allows us to customize the different <code class="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><pre><code class="programlisting nix">{
|
|
||||||
neovim-flake = {
|
|
||||||
url = github:notashelf/neovim-flake;
|
|
||||||
# you can override input nixpkgs
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# you can also override individual plugins
|
|
||||||
# i.e inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- obsidian nvim needs to be in your inputs
|
|
||||||
};
|
|
||||||
}
|
|
||||||
</code></pre><p>Followed by importing the home-manager module somewhere in your configuration.</p><pre><code class="programlisting nix">{
|
|
||||||
# assuming neovim-flake is in your inputs and inputs is in the argset
|
|
||||||
imports = [ inputs.neovim-flake.homeManagerModules.default ];
|
|
||||||
}
|
|
||||||
</code></pre><p>An example installation for standalone home-manager would look like this:</p><pre><code class="programlisting nix">{
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
|
||||||
stylix.url = "github:notashelf/neovim-flake";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, neovim-flake ... }: let
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-languages" class="title" >Language Support </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-languages-custom-lsp-packages">LSP Custom Packages/Command</a> </span></dt> </dl></div><p>Language specific support means there is a combination of language specific
|
||||||
system = "x86_64-linux"; in {
|
plugins, <code class="literal">treesitter</code> support, <code class="literal">nvim-lspconfig</code> language servers, and <code class="literal">null-ls</code>
|
||||||
# ↓ this is the home-manager output in the flake schema
|
integration. This gets you capabilities ranging from autocompletion to formatting
|
||||||
homeConfigurations."yourUsername»" = home-manager.lib.homeManagerConfiguration {
|
to diagnostics. The following languages have sections under the <code class="literal">vim.languages</code>
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
attribute.</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Rust: <a class="link" href="options.html#opt-vim.languages.rust.enable" >vim.languages.rust.enable</a></p></li><li class="listitem"><p>Nix: <a class="link" href="options.html#opt-vim.languages.nix.enable" >vim.languages.nix.enable</a></p></li><li class="listitem"><p>SQL: <a class="link" href="options.html#opt-vim.languages.sql.enable" >vim.languages.sql.enable</a></p></li><li class="listitem"><p>C/C++: <a class="link" href="options.html#opt-vim.languages.clang.enable" >vim.languages.clang.enable</a></p></li><li class="listitem"><p>Typescript/Javascript: <a class="link" href="options.html#opt-vim.languages.ts.enable" >vim.languages.ts.enable</a></p></li><li class="listitem"><p>Python: <a class="link" href="options.html#opt-vim.languages.python.enable" >vim.languages.python.enable</a>:</p></li><li class="listitem"><p>Zig: <a class="link" href="options.html#opt-vim.languages.zig.enable" >vim.languages.zig.enable</a></p></li><li class="listitem"><p>Markdown: <a class="link" href="options.html#opt-vim.languages.markdown.enable" >vim.languages.markdown.enable</a></p></li><li class="listitem"><p>HTML: <a class="link" href="options.html#opt-vim.languages.html.enable" >vim.languages.html.enable</a></p></li><li class="listitem"><p>Dart: <a class="link" href="options.html#opt-vim.languages.dart.enable" >vim.languages.dart.enable</a></p></li><li class="listitem"><p>Go: <a class="link" href="options.html#opt-vim.languages.go.enable" >vim.languages.go.enable</a></p></li><li class="listitem"><p>Lua: <a class="link" href="options.html#opt-vim.languages.lua.enable" >vim.languages.lua.enable</a></p></li><li class="listitem"><p>PHP: <a class="link" href="options.html#opt-vim.languages.php.enable" >vim.languages.php.enable</a></p></li></ul></div><p>Adding support for more languages, and improving support for existing ones are great places
|
||||||
modules = [
|
where you can contribute with a PR.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-languages-custom-lsp-packages" class="title" style="clear: both">LSP Custom Packages/Command </h2> </div> </div></div><p>In any of the <code class="literal">opt.languages.<language>.lsp.package</code> options you can provide
|
||||||
neovim-flake.homeManagerModules.default # <- this imports the home-manager module that provides the options
|
your own LSP package, or provide the command to launch the language server, as
|
||||||
./home.nix # your home-manager configuration, probably where you will want to add programs.neovim-flake options
|
a list of strings. You can use this to skip automatic installation of a language
|
||||||
];
|
server, and instead use the one found in your <code class="literal">$PATH</code> during runtime, for
|
||||||
};
|
example:</p><pre><code class="programlisting nix">vim.languages.java = {
|
||||||
};
|
|
||||||
}
|
|
||||||
</code></pre><p>Once the module is imported, we will be able to define the following options (and much more) from inside the
|
|
||||||
home-manager configuration.</p><pre><code class="programlisting nix{"> programs.neovim-flake = {
|
|
||||||
|
|
||||||
enable = true;
|
|
||||||
# your settings need to go into the settings attribute set
|
|
||||||
# most settings are documented in the appendix
|
|
||||||
settings = {
|
|
||||||
vim.viAlias = false;
|
|
||||||
vim.vimAlias = true;
|
|
||||||
vim.lsp = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
</code></pre><div class="note"><h3 class="title">Note</h3><p>You may find all avaliable options in the <a class="link" href="https://notashelf.github.io/neovim-flake/options" target="_top">appendix</a></p></div></div>
|
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-languages"></a>Language Support </h1> </div> </div></div><div class="partintro"><p>Language specific support means there is a combination of language specific plugins, <code class="literal">treesitter</code> support, <code class="literal">nvim-lspconfig</code> language servers, and <code class="literal">null-ls</code> integration. This gets you capabilities ranging from autocompletion to formatting to diagnostics. The following languages have sections under the <code class="literal">vim.languages</code> attribute. See the configuration docs for details.</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Rust: <a class="link" href="options.html#opt-vim.languages.rust.enable" >vim.languages.rust.enable</a></p></li><li class="listitem"><p>Nix: <a class="link" href="options.html#opt-vim.languages.nix.enable" >vim.languages.nix.enable</a></p></li><li class="listitem"><p>SQL: <a class="link" href="options.html#opt-vim.languages.sql.enable" >vim.languages.sql.enable</a></p></li><li class="listitem"><p>C/C++: <a class="link" href="options.html#opt-vim.languages.clang.enable" >vim.languages.clang.enable</a></p></li><li class="listitem"><p>Typescript/Javascript: <a class="link" href="options.html#opt-vim.languages.ts.enable" >vim.languages.ts.enable</a></p></li><li class="listitem"><p>Python: <a class="link" href="options.html#opt-vim.languages.python.enable" >vim.languages.python.enable</a>:</p></li><li class="listitem"><p>Zig: <a class="link" href="options.html#opt-vim.languages.zig.enable" >vim.languages.zig.enable</a></p></li><li class="listitem"><p>Markdown: <a class="link" href="options.html#opt-vim.languages.markdown.enable" >vim.languages.markdown.enable</a></p></li><li class="listitem"><p>HTML: <a class="link" href="options.html#opt-vim.languages.html.enable" >vim.languages.html.enable</a></p></li><li class="listitem"><p>Dart: <a class="link" href="options.html#opt-vim.languages.dart.enable" >vim.languages.dart.enable</a></p></li><li class="listitem"><p>Go: <a class="link" href="options.html#opt-vim.languages.go.enable" >vim.languages.go.enable</a></p></li><li class="listitem"><p>Lua: <a class="link" href="options.html#opt-vim.languages.lua.enable" >vim.languages.lua.enable</a></p></li><li class="listitem"><p>PHP: <a class="link" href="options.html#opt-vim.languages.php.enable" >vim.languages.php.enable</a></p></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><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-languages-custom-lsp-packages">LSP Custom Packages/Command</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-languages-custom-lsp-packages"></a>LSP Custom Packages/Command </h2> </div> </div></div><p>In any of the <code class="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 <code class="literal">$PATH</code> during runtime, for example:</p><pre><code class="programlisting nix">vim.languages.java = {
|
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# this expects jdt-language-server to be in your PATH
|
||||||
|
# or in `vim.extraPackages`
|
||||||
package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"];
|
package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-hacking"></a>Hacking neovim-flake </h1> </div> </div></div><div class="partintro"><p>neovim-flake is designed for developers as much as it is for the end user. I would like any potential contributor
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="ch-using-dags" class="title" >Using DAGs </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entryAnywhere">entryAnywhere</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#ch-types-dag-entryAfter">entryAfter</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#ch-types-dag-entryBefore">entryBefore</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entryBetween">entryBetween</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesAnywhere">entriesAnywhere</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesAfter">entriesAfter</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesBefore">entriesBefore</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-types-dag-entriesBetween">entriesBetween</a> </span></dt> </dl></div><p>We conform to the NixOS options types for the most part, however, a noteworthy
|
||||||
|
addition for certain options is the <a class="link" href="https://en.wikipedia.org/wiki/Directed_acyclic_graph" target="_top"><span class="strong"><strong>DAG
|
||||||
|
(Directed acyclic graph)</strong></span></a>
|
||||||
|
type which is borrowed from home-manager’s extended library. This type is most
|
||||||
|
used for topologically sorting strings. The DAG type allows the attribute set
|
||||||
|
entries to express dependency relations among themselves. This can, for
|
||||||
|
example, be used to control the order of configuration sections in your
|
||||||
|
<code class="literal">configRC</code> or <code class="literal">luaConfigRC</code>.</p><p>The below section, mostly taken from the <a class="link" href="https://raw.githubusercontent.com/nix-community/home-manager/master/docs/manual/writing-modules/types.md" target="_top">home-manager
|
||||||
|
manual</a>
|
||||||
|
explains in more detail the overall usage logic of the DAG type.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-types-dag-entryAnywhere" class="title" style="clear: both">entryAnywhere </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entryAnywhere (value: T) : DagEntry<T></code></p></blockquote></div><p>Indicates that <code class="literal">value</code> can be placed anywhere within the DAG.
|
||||||
|
This is also the default for plain attribute set entries, that
|
||||||
|
is</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
a = lib.dag.entryAnywhere 0;
|
||||||
|
}
|
||||||
|
</code></pre><p>and</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
a = 0;
|
||||||
|
}
|
||||||
|
</code></pre><p>are equivalent.</p>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="ch-types-dag-entryAfter" class="title" style="clear: both">entryAfter </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entryAfter (afters: list string) (value: T) : DagEntry<T></code></p></blockquote></div><p>Indicates that <code class="literal">value</code> must be placed <span class="emphasis"><em>after</em></span> each of the
|
||||||
|
attribute names in the given list. For example</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
a = 0;
|
||||||
|
b = lib.dag.entryAfter [ "a" ] 1;
|
||||||
|
}
|
||||||
|
</code></pre><p>would place <code class="literal">b</code> after <code class="literal">a</code> in the graph.</p>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="ch-types-dag-entryBefore" class="title" style="clear: both">entryBefore </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entryBefore (befores: list string) (value: T) : DagEntry<T></code></p></blockquote></div><p>Indicates that <code class="literal">value</code> must be placed <span class="emphasis"><em>before</em></span> each of the
|
||||||
|
attribute names in the given list. For example</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
b = lib.dag.entryBefore [ "a" ] 1;
|
||||||
|
a = 0;
|
||||||
|
}
|
||||||
|
</code></pre><p>would place <code class="literal">b</code> before <code class="literal">a</code> in the graph.</p>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-types-dag-entryBetween" class="title" style="clear: both">entryBetween </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entryBetween (befores: list string) (afters: list string) (value: T) : DagEntry<T></code></p></blockquote></div><p>Indicates that <code class="literal">value</code> must be placed <span class="emphasis"><em>before</em></span> the attribute
|
||||||
|
names in the first list and <span class="emphasis"><em>after</em></span> the attribute names in the
|
||||||
|
second list. For example</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
a = 0;
|
||||||
|
c = lib.dag.entryBetween [ "b" ] [ "a" ] 2;
|
||||||
|
b = 1;
|
||||||
|
}
|
||||||
|
</code></pre><p>would place <code class="literal">c</code> before <code class="literal">b</code> and after <code class="literal">a</code> in the graph.</p><p>There are also a set of functions that generate a DAG from a list.
|
||||||
|
These are convenient when you just want to have a linear list of DAG
|
||||||
|
entries, without having to manually enter the relationship between
|
||||||
|
each entry. Each of these functions take a <code class="literal">tag</code> as argument and the
|
||||||
|
DAG entries will be named <code class="literal">${tag}-${index}</code>.</p>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-types-dag-entriesAnywhere" class="title" style="clear: both">entriesAnywhere </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entriesAnywhere (tag: string) (values: [T]) : Dag<T></code></p></blockquote></div><p>Creates a DAG with the given values with each entry labeled
|
||||||
|
using the given tag. For example</p><pre><code class="programlisting nix">foo.bar = lib.dag.entriesAnywhere "a" [ 0 1 ];
|
||||||
|
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
a-0 = 0;
|
||||||
|
a-1 = lib.dag.entryAfter [ "a-0" ] 1;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-types-dag-entriesAfter" class="title" style="clear: both">entriesAfter </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entriesAfter (tag: string) (afters: list string) (values: [T]) : Dag<T></code></p></blockquote></div><p>Creates a DAG with the given values with each entry labeled
|
||||||
|
using the given tag. The list of values are placed are placed
|
||||||
|
<span class="emphasis"><em>after</em></span> each of the attribute names in <code class="literal">afters</code>. For example</p><pre><code class="programlisting nix">foo.bar =
|
||||||
|
{ b = 0; } // lib.dag.entriesAfter "a" [ "b" ] [ 1 2 ];
|
||||||
|
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
b = 0;
|
||||||
|
a-0 = lib.dag.entryAfter [ "b" ] 1;
|
||||||
|
a-1 = lib.dag.entryAfter [ "a-0" ] 2;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-types-dag-entriesBefore" class="title" style="clear: both">entriesBefore </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entriesBefore (tag: string) (befores: list string) (values: [T]) : Dag<T></code></p></blockquote></div><p>Creates a DAG with the given values with each entry labeled
|
||||||
|
using the given tag. The list of values are placed <span class="emphasis"><em>before</em></span> each
|
||||||
|
of the attribute names in <code class="literal">befores</code>. For example</p><pre><code class="programlisting nix"> foo.bar =
|
||||||
|
{ b = 0; } // lib.dag.entriesBefore "a" [ "b" ] [ 1 2 ];
|
||||||
|
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
b = 0;
|
||||||
|
a-0 = 1;
|
||||||
|
a-1 = lib.dag.entryBetween [ "b" ] [ "a-0" ] 2;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-types-dag-entriesBetween" class="title" style="clear: both">entriesBetween </h2> </div> </div></div><div class="blockquote"><blockquote class="blockquote"><p><code class="literal">lib.dag.entriesBetween (tag: string) (befores: list string) (afters: list string) (values: [T]) : Dag<T></code></p></blockquote></div><p>Creates a DAG with the given values with each entry labeled
|
||||||
|
using the given tag. The list of values are placed <span class="emphasis"><em>before</em></span> each
|
||||||
|
of the attribute names in <code class="literal">befores</code> and <span class="emphasis"><em>after</em></span> each of the
|
||||||
|
attribute names in <code class="literal">afters</code>. For example</p><pre><code class="programlisting nix">foo.bar =
|
||||||
|
{ b = 0; c = 3; } // lib.dag.entriesBetween "a" [ "b" ] [ "c" ] [ 1 2 ];
|
||||||
|
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||||
|
b = 0;
|
||||||
|
c = 3;
|
||||||
|
a-0 = lib.dag.entryAfter [ "c" ] 1;
|
||||||
|
a-1 = lib.dag.entryBetween [ "b" ] [ "a-0" ] 2;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h1 id="ch-hacking" class="title" >Hacking nvf </h1> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting Started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-documentation">Adding Documentation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-formatting">Formatting Code</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-commit-message-style">Formatting Commits</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-commit-style">Commit Style</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-ex-commit-message">Example Commit</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-code-style">Code Style</a> </span></dt></dl></dd><dt> <span class="section"> <a href="index.xhtml#sec-testing-changes">Testing Changes</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-keybinds">Keybinds</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-custom-key-mappings">Custom Key Mappings Support for a Plugin</a> </span></dt></dl></dd><dt> <span class="section"> <a href="index.xhtml#sec-additional-plugins">Adding Plugins</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-modular-setup-options">Modular setup options</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-details-of-toluaobject">Details of toLuaObject</a> </span></dt></dl></dd> </dl></div><p><span class="strong"><strong>nvf</strong></span> 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
|
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
|
(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
|
into <span class="strong"><strong>nvf</strong></span>’s development without leaving question marks in your head.</p><p>This section is mainly directed towards those who wish to contribute code into <span class="strong"><strong>nvf</strong></span>. If you wish to instead
|
||||||
report a bug or discuss a potential feature implementation, first look among the
|
report a bug or discuss a potential feature implementation, first look among the
|
||||||
already <a class="link" href="https://github.com/notashelf/neovim-flake/issues" target="_top">open issues</a> and if no matching issue exists you may open
|
already <a class="link" href="https://github.com/notashelf/nvf/issues" target="_top">open issues</a> and if no matching issue exists you may open
|
||||||
a <a class="link" href="https://github.com/notashelf/neovim-flake/issues/new" target="_top">new issue</a> and describe your problem/request. While creating an
|
a <a class="link" href="https://github.com/notashelf/nvf/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
|
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><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting Started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-testing-changes">Testing Changes</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-keybinds">Keybinds</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-additional-plugins">Adding Plugins</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-contrib-getting-started"></a>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
|
occurs or a feature should be implemented.</p><div class="section"> <div class="titlepage"> <div> <div> <h1 id="sec-contrib-getting-started" class="title" style="clear: both">Getting Started </h1> </div> </div></div><p>You, naturally, would like to start by forking the repository to get started. If
|
||||||
<a class="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 are new to Git and GitHub, do have a look at GitHub’s <a class="link" href="https://help.github.com/articles/fork-a-repo/" target="_top">Fork a repo guide</a>
|
||||||
you should create a branch starting at the most recent <code class="literal">main</code> branch.
|
for instructions on how you can do this. Once you have a fork of <span class="strong"><strong>nvf</strong></span>, you
|
||||||
Give your branch a reasonably descriptive name, suffixed by its type - i.e <code class="literal">feature/debugger</code> or <code class="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
|
should create a separate branch based on the msot recent <code class="literal">main</code> branch. Give
|
||||||
that it fulfills <a class="link" href="index.xhtml#sec-guidelines" title="Guidelines" >Guidelines</a>. Once you are confident everything is in order, push the branch to GitHub and
|
your branch a reasonably descriptive name (e.g. <code class="literal">feature/debugger</code> or
|
||||||
<a class="link" href="https://help.github.com/articles/creating-a-pull-request" target="_top">create a pull request</a>, following the template that you will be prompted to fill.</p>
|
<code class="literal">fix/pesky-bug</code>) and you are ready to work on your changes</p><p>Implement your changes and commit them to the newly created branch and when you
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-guidelines"></a>Guidelines </h2> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-guidelines-documentation">Adding Documentation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-formatting">Formatting Code</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-commit-message-style">Formatting Commits</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-commit-style">Commit Style</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-ex-commit-message">Example Commit</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-code-style">Code Style</a> </span></dt> </dl></div><p>If your contribution tightly follows the guidelines, then there is a good chance it will be merged without too much
|
are happy with the result, and positive that it fullfills our <a class="link" href="index.xhtml#sec-guidelines" title="Guidelines" >Contributing
|
||||||
trouble. Some of the guidelines will be strictly enforced, others will remain as gentle nudges towards the correct
|
Guidelines</a>, push the branch to GitHub and <a class="link" href="https://help.github.com/articles/creating-a-pull-request" target="_top">create a pull
|
||||||
direction. As we have no automated system enforcing those guidelines, please try to double check your changes before
|
request</a>. The default
|
||||||
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
|
pull request template available on the <span class="strong"><strong>nvf</strong></span> repository will guide you through
|
||||||
discussion in the <a class="link" href="https://github.com/NotAShelf/neovim-flake/discussions" target="_top">discussions tab</a> ideally (but not necessarily)
|
the rest of the process, and we’ll gently nudge you in the correct direction if
|
||||||
before you start developing.</p><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-documentation"></a>Adding Documentation </h3> </div> </div></div><p>Most, if not all, changes warrant changes to the documentation. Module options should be documented with
|
there are any mistakes.</p>
|
||||||
<a class="link" href="https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup" target="_top">Nixpkgs-flavoured Markdown</a>, albeit with exceptions.</p><div class="note"><h3 class="title">Note</h3><p>As of v0.5, neovim-flake is itself documented using full markdown in both module options and the manual. With
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h1 id="sec-guidelines" class="title" style="clear: both">Guidelines </h1> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-guidelines-documentation">Adding Documentation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-formatting">Formatting Code</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-commit-message-style">Formatting Commits</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-commit-style">Commit Style</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-ex-commit-message">Example Commit</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-code-style">Code Style</a> </span></dt> </dl></div><p>If your contribution tightly follows the guidelines, then there is a good chance
|
||||||
v0.6, this manual has also been converted to markdown in full.</p></div><p>The HTML version of this manual containing both the module option descriptions and the documentation of neovim-flake
|
it will be merged without too much trouble. Some of the guidelines will be
|
||||||
(such as this page) can be generated and opened by typing the following in a shell within a clone of the
|
strictly enforced, others will remain as gentle nudges towards the correct
|
||||||
neovim-flake Git repository:</p><pre><code class="programlisting console">$ nix build .#docs-html
|
direction. As we have no automated system enforcing those guidelines, please
|
||||||
$ xdg-open $PWD/result/share/doc/neovim-flake/index.html
|
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 <a class="link" href="https://github.com/NotAShelf/nvf/discussions" target="_top">discussions tab</a>
|
||||||
|
ideally (but not necessarily) before you start developing.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-guidelines-documentation" class="title" style="clear: both">Adding Documentation </h2> </div> </div></div><p>Most, if not all, changes warrant changes to the documentation. Module options
|
||||||
|
should be documented with <a class="link" href="https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup" target="_top">Nixpkgs-flavoured Markdown</a>,
|
||||||
|
albeit with exceptions.</p><div class="note"><h3 class="title">Note</h3><p>As of <span class="strong"><strong>v0.5</strong></span>, <span class="strong"><strong>nvf</strong></span> is itself documented using full markdown in both module
|
||||||
|
options and the manual. With <span class="strong"><strong>v0.6</strong></span>, this manual has also been converted to
|
||||||
|
markdown in full.</p></div><p>The HTML version of this manual containing both the module option descriptions
|
||||||
|
and the documentation of <span class="strong"><strong>nvf</strong></span> (such as this page) can be generated and
|
||||||
|
opened by typing the following in a shell within a clone of the <span class="strong"><strong>nvf</strong></span> Git
|
||||||
|
repository:</p><pre><code class="programlisting console">$ nix build .#docs-html
|
||||||
|
$ xdg-open $PWD/result/share/doc/nvf/index.html
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-formatting"></a>Formatting Code </h3> </div> </div></div><p>Make sure your code is formatted as described in <a class="link" href="index.xhtml#sec-guidelines-code-style" title="Code Style" >code-style section</a>. To maintain consistency throughout
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-guidelines-formatting" class="title" style="clear: both">Formatting Code </h2> </div> </div></div><p>Make sure your code is formatted as described in <a class="link" href="index.xhtml#sec-guidelines-code-style" title="Code Style" >code-style
|
||||||
the project you are encouraged to browse through existing code and adopt its style also in new code.</p>
|
section</a>. To maintain consistency throughout the
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-commit-message-style"></a>Formatting Commits </h3> </div> </div></div><p>Similar to <a class="link" href="index.xhtml#sec-guidelines-code-style" title="Code Style" >code style guidelines</a> we encourage a consistent commit message format as described
|
project you are encouraged to browse through existing code and adopt its style
|
||||||
in <a class="link" href="index.xhtml#sec-guidelines-commit-style" title="Commit Style" >commit style guidelines</a>.</p>
|
also in new code.</p>
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-commit-style"></a>Commit Style </h3> </div> </div></div><p>The commits in your pull request should be reasonably self-contained. Which means each and every commit in
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-guidelines-commit-message-style" class="title" style="clear: both">Formatting Commits </h2> </div> </div></div><p>Similar to <a class="link" href="index.xhtml#sec-guidelines-code-style" title="Code Style" >code style guidelines</a> we encourage a
|
||||||
a pull request should make sense both on its own and in general context. That is, a second commit should not resolve
|
consistent commit message format as described in <a class="link" href="index.xhtml#sec-guidelines-commit-style" title="Commit Style" >commit style
|
||||||
an issue that is introduced in an earlier commit. In particular, you will be asked to amend any commit that
|
guidelines</a>.</p>
|
||||||
introduces syntax errors or similar problems even if they are fixed in a later commit.</p><p>The commit messages should follow the <a class="link" href="https://chris.beams.io/posts/git-commit/#seven-rule" target="_top">seven rules</a>,
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-guidelines-commit-style" class="title" style="clear: both">Commit Style </h2> </div> </div></div><p>The commits in your pull request should be reasonably self-contained. Which
|
||||||
except for “Capitalize the subject line”. We also ask you to include the affected code component or module in
|
means each and every commit in a pull request should make sense both on its
|
||||||
the first line. A commit message ideally, but not necessarily, follow the given template from home-manager’s own documentation</p><pre><code class="programlisting"> {component}: {description}
|
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 <a class="link" href="https://chris.beams.io/posts/git-commit/#seven-rule" 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><pre><code class="programlisting"> {component}: {description}
|
||||||
|
|
||||||
{long description}
|
{long description}
|
||||||
</code></pre><p>where <code class="literal">{component}</code> refers to the code component (or module) your change affects, <code class="literal">{description}</code> is a very brief
|
</code></pre><p>where <code class="literal">{component}</code> refers to the code component (or module) your change
|
||||||
description of your change, and <code class="literal">{long description}</code> is an optional clarifying description. As a rare exception, if
|
affects, <code class="literal">{description}</code> is a very brief description of your change, and
|
||||||
there is no clear component, or your change affects many components, then the <code class="literal">{component}</code> part is optional.
|
<code class="literal">{long description}</code> is an optional clarifying description. As a rare
|
||||||
See <a class="link" href="index.xhtml#sec-guidelines-ex-commit-message" title="Example Commit" >example commit message</a> for a commit message that fulfills these requirements.</p>
|
exception, if there is no clear component, or your change affects many
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-ex-commit-message"></a>Example Commit </h3> </div> </div></div><p>The commit <a class="link" href="https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef" target="_top">69f8e47e9e74c8d3d060ca22e18246b7f7d988ef</a> contains the commit message</p><pre><code class="programlisting">
|
components, then the <code class="literal">{component}</code> part is optional. See <a class="link" href="index.xhtml#sec-guidelines-ex-commit-message" title="Example Commit" >example commit
|
||||||
starship: allow running in Emacs if vterm is used
|
message</a> for a commit message that
|
||||||
|
fulfills these requirements.</p>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-guidelines-ex-commit-message" class="title" style="clear: both">Example Commit </h2> </div> </div></div><p>The commit <a class="link" href="https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef" target="_top">69f8e47e9e74c8d3d060ca22e18246b7f7d988ef</a>
|
||||||
|
in home-manager contains the following commit message.</p><pre><code class="programlisting">starship: allow running in Emacs if vterm is used
|
||||||
|
|
||||||
The vterm buffer is backed by libvterm and can handle Starship prompts
|
The vterm buffer is backed by libvterm and can handle Starship prompts
|
||||||
without issues.
|
without issues.
|
||||||
|
</code></pre><p>Similarly, if you are contributing to <span class="strong"><strong>nvf</strong></span>, you would include the scope of
|
||||||
|
the commit followed by the description:</p><pre><code class="programlisting">languages/ruby: init module
|
||||||
|
|
||||||
</code></pre><p>Long description can be ommitted if the change is too simple to warrant it. A minor fix in spelling or a formatting
|
Adds a language module for Ruby, adds appropriate formatters and Treesitter grammers
|
||||||
change does not warrant long description, however, a module addition or removal does as you would like to provide the
|
</code></pre><p>Long description can be ommitted if the change is too simple to warrant it. A
|
||||||
relevant context for your changes.</p><p>Finally, when adding a new module, say <code class="literal">modules/foo.nix</code>, we use the fixed commit format <code class="literal">foo: add module</code>.
|
minor fix in spelling or a formatting change does not warrant long description,
|
||||||
You can, of course, still include a long description if you wish.</p><p>In case of nested modules, i.e <code class="literal">modules/languages/java.nix</code> you are recommended to contain the parent as well - for
|
however, a module addition or removal does as you would like to provide the
|
||||||
example <code class="literal">languages/java: some major change</code>.</p>
|
relevant context, i.e. the reasoning behind it, for your commit.</p><p>Finally, when adding a new module, say <code class="literal">modules/foo.nix</code>, we use the fixed
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-code-style"></a>Code Style </h3> </div> </div></div><p><span class="strong"><strong>Treewide</strong></span>
|
commit format <code class="literal">foo: add module</code>. You can, of course, still include a long
|
||||||
Keep lines at a reasonable width, ideally 80 characters or less. This also applies to string literals and module
|
description if you wish.</p><p>In case of nested modules, i.e <code class="literal">modules/languages/java.nix</code> you are recommended
|
||||||
descriptions and documentation.</p><p><span class="strong"><strong>Nix</strong></span>
|
to contain the parent as well - for example <code class="literal">languages/java: some major change</code>.</p>
|
||||||
neovim-flake is formatted by the <a class="link" href="https://github.com/kamadorueda/alejandra" target="_top">alejandra</a> tool and the formatting is checked in the pull
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-guidelines-code-style" class="title" style="clear: both">Code Style </h2> </div> </div></div><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-code-style-treewide" class="title" >Treewide </h3> </div> </div></div><p>Keep lines at a reasonable width, ideally 80 characters or less. This also applies
|
||||||
request and push workflows. Run the <code class="literal">nix fmt</code> command inside the project repository before submitting your
|
to string literals and module descriptions and documentation.</p>
|
||||||
pull request.</p><p>While Alejandra is mostly opinionated on how code looks after formatting, certain changes are done at the
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-code-style-nix" class="title" >Nix </h3> </div> </div></div><p><span class="strong"><strong>nvf</strong></span> is formatted by the <a class="link" href="https://github.com/kamadorueda/alejandra" target="_top">alejandra</a>
|
||||||
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.
|
tool and the formatting is checked in the pull request and push workflows. Run the
|
||||||
|
<code class="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><pre><code class="programlisting nix"># parent modules should always be unfolded
|
For example:</p><pre><code class="programlisting nix"># parent modules should always be unfolded
|
||||||
# which means module = { value = ... } instead of module.value = { ... }
|
# which means module = { value = ... } instead of module.value = { ... }
|
||||||
module = {
|
module = {
|
||||||
|
@ -307,16 +580,15 @@ module = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</code></pre><p>If you move a line down after the merge operator, Alejandra will automatically unfold the whole merged attrset
|
</code></pre><p>If you move a line down after the merge operator, Alejandra will automatically
|
||||||
for you, which we <span class="strong"><strong>do not</strong></span> want.</p><pre><code class="programlisting nix">module = {
|
unfold the whole merged attrset for you, which we <span class="strong"><strong>do not</strong></span> want.</p><pre><code class="programlisting nix">module = {
|
||||||
key = mkEnableOption "some description" // {
|
key = mkEnableOption "some description" // {
|
||||||
default = true; # we want this to be inline
|
default = true; # we want this to be inline
|
||||||
}; # ...
|
}; # ...
|
||||||
}
|
}
|
||||||
</code></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
|
</code></pre><p>For lists, it is mostly up to your own discretion how you want to format them,
|
||||||
they contain multiple items and especially if they are to include comments.</p><pre><code class="programlisting nix">
|
but please try to unfold lists if they contain multiple items and especially
|
||||||
# this is ok
|
if they are to include comments.</p><pre><code class="programlisting nix"># this is ok
|
||||||
|
|
||||||
acceptableList = [
|
acceptableList = [
|
||||||
item1 # comment
|
item1 # comment
|
||||||
item2
|
item2
|
||||||
|
@ -328,25 +600,34 @@ acceptableList = [
|
||||||
listToBeAvoided = [item1 item2 /* comment */ item3 item4];
|
listToBeAvoided = [item1 item2 /* comment */ item3 item4];
|
||||||
|
|
||||||
# this is ok
|
# this is ok
|
||||||
acceptableList = [item1];
|
acceptableList = [item1 item2];
|
||||||
|
|
||||||
# this is not ok
|
# this is also ok if the list is expected to contain more elements
|
||||||
listToBeAvoided = [
|
acceptableList= [
|
||||||
item1
|
item1
|
||||||
|
item2
|
||||||
|
# more items if needed...
|
||||||
];
|
];
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-testing-changes"></a>Testing 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
|
</div>
|
||||||
<code class="literal">configuration.nix</code> (located in the root of this project) inside <code class="literal">neovimConfiguration</code>. Enable it, and then run the
|
|
||||||
maximal configuration with <code class="literal">nix run .#maximal -Lv</code> to check for build errors. If neovim opens in the current directory
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h1 id="sec-testing-changes" class="title" style="clear: both">Testing Changes </h1> </div> </div></div><p>Once you have made your changes, you will need to test them throughly. If it is
|
||||||
without any error messages (you can check the output of <code class="literal">:messages</code> inside neovim to see if there are any errors), then
|
a module, add your module option to <code class="literal">configuration.nix</code> (located in the root of
|
||||||
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
|
this project) inside <code class="literal">neovimConfiguration</code>. Enable it, and then run the maximal
|
||||||
maximal configuration by editing <code class="literal">configuration.nix</code>, and then run it with <code class="literal">nix run .#maximal -Lv</code>. Same procedure as
|
configuration with <code class="literal">nix run .#maximal -Lv</code> to check for build errors. If neovim
|
||||||
adding a new module will apply here.</p>
|
opens in the current directory without any error messages (you can check the
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-keybinds"></a>Keybinds </h2> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-custom-key-mappings">Custom Key Mappings Support for a Plugin</a> </span></dt> </dl></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
|
output of <code class="literal">:messages</code> inside neovim to see if there are any errors), then your
|
||||||
the <a class="link" href="https://github.com/NotAShelf/neovim-flake/tree/main/lib" target="_top">extended standard library</a>. The following section contains
|
changes are good to go. Open your pull request, and it will be reviewed as soon
|
||||||
a general overview to how you may utilize said functions.</p><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-custom-key-mappings"></a>Custom Key Mappings Support for a Plugin </h3> </div> </div></div><p>To set a mapping, you should define it in <code class="literal">vim.maps.<<mode>></code>.
|
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
|
||||||
|
<code class="literal">configuration.nix</code>, and then run it with <code class="literal">nix run .#maximal -Lv</code>. Same procedure
|
||||||
|
as adding a new module will apply here.</p>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h1 id="sec-keybinds" class="title" style="clear: both">Keybinds </h1> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-custom-key-mappings">Custom Key Mappings Support for a Plugin</a> </span></dt> </dl></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 <a class="link" href="https://github.com/NotAShelf/nvf/tree/main/lib" target="_top">extended standard
|
||||||
|
library</a>. The following
|
||||||
|
section contains a general overview to how you may utilize said functions.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-custom-key-mappings" class="title" style="clear: both">Custom Key Mappings Support for a Plugin </h2> </div> </div></div><p>To set a mapping, you should define it in <code class="literal">vim.maps.<<mode>></code>.
|
||||||
The available modes are:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>normal</p></li><li class="listitem"><p>insert</p></li><li class="listitem"><p>select</p></li><li class="listitem"><p>visual</p></li><li class="listitem"><p>terminal</p></li><li class="listitem"><p>normalVisualOp</p></li><li class="listitem"><p>visualOnly</p></li><li class="listitem"><p>operator</p></li><li class="listitem"><p>insertCommand</p></li><li class="listitem"><p>lang</p></li><li class="listitem"><p>command</p></li></ul></div><p>An example, simple keybinding, can look like this:</p><pre><code class="programlisting nix">{
|
The available modes are:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>normal</p></li><li class="listitem"><p>insert</p></li><li class="listitem"><p>select</p></li><li class="listitem"><p>visual</p></li><li class="listitem"><p>terminal</p></li><li class="listitem"><p>normalVisualOp</p></li><li class="listitem"><p>visualOnly</p></li><li class="listitem"><p>operator</p></li><li class="listitem"><p>insertCommand</p></li><li class="listitem"><p>lang</p></li><li class="listitem"><p>command</p></li></ul></div><p>An example, simple keybinding, can look like this:</p><pre><code class="programlisting nix">{
|
||||||
vim.maps.normal = {
|
vim.maps.normal = {
|
||||||
"<leader>wq" = {
|
"<leader>wq" = {
|
||||||
|
@ -357,14 +638,27 @@ The available modes are:</p><div class="itemizedlist"><ul class="itemizedlist co
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</code></pre><p>There are many settings available in the options. Please refer to the
|
</code></pre><p>There are many settings available in the options. Please refer to the
|
||||||
<a class="link" href="https://notashelf.github.io/neovim-flake/options.html#opt-vim.maps.command._name_.action" target="_top">documentation</a>
|
<a class="link" href="https://notashelf.github.io/nvf/options.html#opt-vim.maps.command._name_.action" target="_top">documentation</a>
|
||||||
to see a list of them.</p><p><code class="literal">neovim-flake</code> provides a list of helper commands, so that you don’t have to write the mapping attribute sets every
|
to see a list of them.</p><p><span class="strong"><strong>nvf</strong></span> provides a list of helper commands, so that you don’t have to write the
|
||||||
time:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p><code class="literal">mkBinding = key: action: desc:</code> - makes a basic binding, with <code class="literal">silent</code> set to true.</p></li><li class="listitem"><p><code class="literal">mkExprBinding = key: action: desc:</code> - makes an expression binding, with <code class="literal">lua</code>, <code class="literal">silent</code>, and <code class="literal">expr</code> set to true.</p></li><li class="listitem"><p><code class="literal">mkLuaBinding = key: action: desc:</code> - makes an expression binding, with <code class="literal">lua</code>, and <code class="literal">silent</code> set to true.</p></li></ul></div><p>Note that the Lua in these bindings is actual Lua, not pasted into a <code class="literal">:lua</code> command.
|
mapping attribute sets every time:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p><code class="literal">mkBinding = key: action: desc:</code> - makes a basic binding, with <code class="literal">silent</code> set
|
||||||
Therefore, you either pass in a function like <code class="literal">require('someplugin').some_function</code>, without actually calling it,
|
to true.</p></li><li class="listitem"><p><code class="literal">mkExprBinding = key: action: desc:</code> - makes an expression binding, with
|
||||||
or you define your own function, like <code class="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><p>Utility function that takes two attrsets:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p><code class="literal">{ someKey = "some_value" }</code></p></li><li class="listitem"><p><code class="literal">{ someKey = { description = "Some Description"; }; }</code></p></li></ul></div><p>and merges them into <code class="literal">{ someKey = { value = "some_value"; description = "Some Description"; }; }</code></p><pre><code class="programlisting">addDescriptionsToMappings = actualMappings: mappingDefinitions:
|
<code class="literal">lua</code>, <code class="literal">silent</code>, and <code class="literal">expr</code> set to true.</p></li><li class="listitem"><p><code class="literal">mkLuaBinding = key: action: desc:</code> - makes an expression binding, with
|
||||||
</code></pre><p>This function can be used in combination with the same <code class="literal">mkBinding</code> functions as above, except they only take two
|
<code class="literal">lua</code>, and <code class="literal">silent</code> set to true.</p></li></ul></div><p>Do note that the Lua in these bindings is actual Lua, and not pasted into a
|
||||||
arguments - <code class="literal">binding</code> and <code class="literal">action</code>, and have different names:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p><code class="literal">mkSetBinding = binding: action:</code> - makes a basic binding, with <code class="literal">silent</code> set to true.</p></li><li class="listitem"><p><code class="literal">mkSetExprBinding = binding: action:</code> - makes an expression binding, with <code class="literal">lua</code>, <code class="literal">silent</code>, and <code class="literal">expr</code> set to true.</p></li><li class="listitem"><p><code class="literal">mkSetLuaBinding = binding: action:</code> - makes an expression binding, with <code class="literal">lua</code>, and <code class="literal">silent</code> set to true.</p></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><pre><code class="programlisting nix">
|
<code class="literal">:lua</code> command. Therefore, you should either pass in a function like
|
||||||
# plugindefinition.nix
|
<code class="literal">require('someplugin').some_function</code>, without actually calling it, or you
|
||||||
|
should define your own functions, for example</p><pre><code class="programlisting lua">function()
|
||||||
|
require('someplugin').some_function()
|
||||||
|
end
|
||||||
|
</code></pre><p>Additionally, to not have to repeat the descriptions, there’s another utility
|
||||||
|
function with its own set of functions: Utility function that takes two
|
||||||
|
attribute sets:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p><code class="literal">{ someKey = "some_value" }</code></p></li><li class="listitem"><p><code class="literal">{ someKey = { description = "Some Description"; }; }</code></p></li></ul></div><p>and merges them into <code class="literal">{ someKey = { value = "some_value"; description = "Some Description"; }; }</code></p><pre><code class="programlisting nix">addDescriptionsToMappings = actualMappings: mappingDefinitions:
|
||||||
|
</code></pre><p>This function can be used in combination with the same <code class="literal">mkBinding</code> functions as
|
||||||
|
above, except they only take two arguments - <code class="literal">binding</code> and <code class="literal">action</code>, and have
|
||||||
|
different names:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p><code class="literal">mkSetBinding = binding: action:</code> - makes a basic binding, with <code class="literal">silent</code>
|
||||||
|
set to true.</p></li><li class="listitem"><p><code class="literal">mkSetExprBinding = binding: action:</code> - makes an expression binding, with
|
||||||
|
<code class="literal">lua</code>, <code class="literal">silent</code>, and <code class="literal">expr</code> set to true.</p></li><li class="listitem"><p><code class="literal">mkSetLuaBinding = binding: action:</code> - makes an expression binding, with
|
||||||
|
<code class="literal">lua</code>, and <code class="literal">silent</code> set to true.</p></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><pre><code class="programlisting nix"># plugindefinition.nix
|
||||||
{lib, ...}: with lib; {
|
{lib, ...}: with lib; {
|
||||||
options.vim.plugin = {
|
options.vim.plugin = {
|
||||||
enable = mkEnableOption "Enable plugin";
|
enable = mkEnableOption "Enable plugin";
|
||||||
|
@ -386,12 +680,10 @@ arguments - <code class="literal">binding</code> and <code class="literal">actio
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
</code></pre><pre><code class="programlisting nix"># config.nix
|
||||||
</code></pre><pre><code class="programlisting nix">
|
|
||||||
# config.nix
|
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -443,28 +735,90 @@ in {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
</code></pre><div class="note"><h3 class="title">Note</h3><p>If you have come across a plugin that has an API that doesn’t seem to easily allow custom keybindings,
|
</code></pre><div class="note"><h3 class="title">Note</h3><p>If you have come across a plugin that has an API that doesn’t seem to easily
|
||||||
don’t be scared to implement a draft PR. We’ll help you get it done.</p></div>
|
allow custom keybindings, don’t be scared to implement a draft PR. We’ll help
|
||||||
|
you get it done.</p></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-additional-plugins"></a>Adding Plugins </h2> </div> </div></div><p>To add a new neovim plugin, first add the source url in the inputs section of <code class="literal">flake.nix</code></p><pre><code class="programlisting nix">
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h1 id="sec-additional-plugins" class="title" style="clear: both">Adding Plugins </h1> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-modular-setup-options">Modular setup options</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-details-of-toluaobject">Details of toLuaObject</a> </span></dt> </dl></div><p>To add a new Neovim plugin, first add the source url in the inputs section of <code class="literal">flake.nix</code>
|
||||||
|
with the prefix <code class="literal">plugin-</code></p><pre><code class="programlisting nix">
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
# ...
|
# ...
|
||||||
neodev-nvim = {
|
plugin-neodev-nvim = {
|
||||||
url = "github:folke/neodev.nvim";
|
url = "github:folke/neodev.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
# ...
|
# ...
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</code></pre><p>Then add the name of the plugin into the <code class="literal">availablePlugins</code> variable in <code class="literal">lib/types/plugins.nix</code>:</p><pre><code class="programlisting nix"># ...
|
</code></pre><p>The addition of the <code class="literal">plugin-</code> prefix will allow <span class="strong"><strong>nvf</strong></span> to autodiscover the
|
||||||
availablePlugins = [
|
input from the flake inputs automatically, allowing you to refer to it in areas
|
||||||
# ...
|
that require a very specific plugin type as defined in <code class="literal">lib/types/plugins.nix</code></p><p>You can now reference this plugin using its string name, the plugin will be
|
||||||
"neodev-nvim"
|
built with the name and source URL from the flake input, allowing you to
|
||||||
];
|
refer to it as a <span class="strong"><strong>string</strong></span>.</p><pre><code class="programlisting nix">config.vim.startPlugins = ["neodev-nvim"];
|
||||||
</code></pre><p>You can now reference this plugin using its string name:</p><pre><code class="programlisting nix">config.vim.startPlugins = ["neodev-nvim"];
|
</code></pre><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-modular-setup-options" class="title" style="clear: both">Modular setup options </h2> </div> </div></div><p>Most plugins is initialized with a call to <code class="literal">require('plugin').setup({...})</code>.</p><p>We use a special function that lets you easily add support for such setup options in a modular way:
|
||||||
|
<code class="literal">mkPluginSetupOption</code>.</p><p>Once you have added the source of the plugin as shown above, you can define the setup options like
|
||||||
|
this:</p><pre><code class="programlisting nix"># in modules/.../your-plugin/your-plugin.nix
|
||||||
|
|
||||||
|
{lib, ...}:
|
||||||
|
let
|
||||||
|
inherit (lib.types) bool int;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.your-plugin = {
|
||||||
|
setupOpts = mkPluginSetupOption "plugin name" {
|
||||||
|
enable_feature_a = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
# ...
|
||||||
|
};
|
||||||
|
|
||||||
|
number_option = mkOption {
|
||||||
|
type = int;
|
||||||
|
default = 3;
|
||||||
|
# ...
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><pre><code class="programlisting nix"># in modules/.../your-plugin/config.nix
|
||||||
|
{lib, config, ...}:
|
||||||
|
let
|
||||||
|
cfg = config.vim.your-plugin;
|
||||||
|
in {
|
||||||
|
vim.luaConfigRC = lib.nvim.dag.entryAnywhere ''
|
||||||
|
require('plugin-name').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
</code></pre><p>This above config will result in this lua script:</p><pre><code class="programlisting lua">require('plugin-name').setup({
|
||||||
|
enable_feature_a = false,
|
||||||
|
number_option = 3,
|
||||||
|
})
|
||||||
|
</code></pre><p>Now users can set any of the pre-defined option field, and can also add their own fields!</p><pre><code class="programlisting nix"># in user's config
|
||||||
|
{
|
||||||
|
vim.your-plugin.setupOpts = {
|
||||||
|
enable_feature_a = true;
|
||||||
|
number_option = 4;
|
||||||
|
another_field = "hello";
|
||||||
|
size = { # nested fields work as well
|
||||||
|
top = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-details-of-toluaobject" class="title" style="clear: both">Details of toLuaObject </h2> </div> </div></div><p>As you’ve seen above, <code class="literal">toLuaObject</code> is used to convert our nix attrSet
|
||||||
|
<code class="literal">cfg.setupOpts</code>, into a lua table. Here are some rules of the conversion:</p><div class="orderedlist"><ol class="orderedlist compact" type="1"><li class="listitem"><p>nix <code class="literal">null</code> converts to lua <code class="literal">nil</code></p></li><li class="listitem"><p>number and strings convert to their lua counterparts</p></li><li class="listitem"><p>nix attrSet/list convert into lua tables</p></li><li class="listitem"><p>you can write raw lua code using <code class="literal">lib.generators.mkLuaInline</code>. This
|
||||||
|
function is part of nixpkgs.</p></li></ol></div><p>Example:</p><pre><code class="programlisting nix">vim.your-plugin.setupOpts = {
|
||||||
|
on_init = lib.generators.mkLuaInline ''
|
||||||
|
function()
|
||||||
|
print('we can write lua!')
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
13871
options.html
13871
options.html
File diff suppressed because it is too large
Load diff
|
@ -5,11 +5,11 @@
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>Appendix B. Release Notes</title>
|
<title>Appendix B. Release Notes</title>
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" /><link rel="stylesheet" type="text/css" href="highlightjs/tomorrow-night.min.css" /><link rel="stylesheet" type="text/css" href="highlightjs/highlight-style.css" />
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script>
|
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script>
|
||||||
<meta name="generator" content="nixos-render-docs" />
|
<meta name="generator" content="nixos-render-docs" />
|
||||||
<link rel="home" href="index.xhtml" title="neovim-flake-manual" />
|
<link rel="home" href="index.xhtml" title="nvf manual" />
|
||||||
<link rel="up" href="index.xhtml" title="neovim-flake-manual" /><link rel="prev" href="options.html" title="Appendix A. Neovim Flake Configuration Options" />
|
<link rel="up" href="index.xhtml" title="nvf manual" /><link rel="prev" href="options.html" title="Appendix A. Neovim Flake Configuration Options" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="navheader">
|
<div class="navheader">
|
||||||
|
@ -24,8 +24,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<hr />
|
<hr />
|
||||||
</div><div class="appendix"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-release-notes"></a>Appendix B. Release Notes </h1> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.1">Release 0.1</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.2">Release 0.2</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.3">Release 0.3</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.4">Release 0.4</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.5">Release 0.5</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.6">Release 0.6</a> </span></dt> </dl></div><p>This section lists the release notes for tagged version of neovim-flake and current main.</p><div class="chapter"> <div class="titlepage"> <div> <div> <h2 class="title" > <a id="sec-release-0.1"></a>Release 0.1 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.1-changelog">Changelog</a> </span></dt> </dl></div><p>This is the current master branch and information here is not final. These are changes from the v0.01 tag.</p><p>Special thanks to <a class="link" href="https://github.com/nix-community/home-manager/" target="_top">home-manager</a> for this release.
|
</div><div class="appendix"> <div class="titlepage"> <div> <div> <h1 id="ch-release-notes" class="title" >Appendix B. Release Notes </h1> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.1">Release 0.1</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.2">Release 0.2</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.3">Release 0.3</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.4">Release 0.4</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.5">Release 0.5</a> </span></dt><dt> <span class="chapter"> <a href="release-notes.html#sec-release-0.6">Release 0.6</a> </span></dt> </dl></div><p>This section lists the release notes for tagged version of <span class="strong"><strong>nvf</strong></span> and
|
||||||
Docs/manual generation, the new module evaluation system, and DAG implementation are from them.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-release-0.1-changelog"></a>Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/jordanisaacs" target="_top">jordanisaacs</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Removed hare language support (lsp/tree-sitter/etc). <code class="literal">vim.lsp.hare</code> is no longer defined.
|
the current main current main branch</p><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.1" class="title" >Release 0.1 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.1-changelog">Changelog</a> </span></dt> </dl></div><p>This is the current master branch and information here is not final. These are changes from the v0.01 tag.</p><p>Special thanks to <a class="link" href="https://github.com/nix-community/home-manager/" target="_top">home-manager</a> for this release.
|
||||||
|
Docs/manual generation, the new module evaluation system, and DAG implementation are from them.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.1-changelog" class="title" style="clear: both">Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/jordanisaacs" target="_top">jordanisaacs</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Removed hare language support (lsp/tree-sitter/etc). <code class="literal">vim.lsp.hare</code> is no longer defined.
|
||||||
If you use hare and would like it added back, please file an issue.</p></li><li class="listitem"><p><a class="link" href="opt-vim.startPlugins" target="_top">vim.stratPlugins</a> & <a class="link" href="opt-vim.optPlugins" target="_top">vim.optPlugins</a> are now
|
If you use hare and would like it added back, please file an issue.</p></li><li class="listitem"><p><a class="link" href="opt-vim.startPlugins" target="_top">vim.stratPlugins</a> & <a class="link" href="opt-vim.optPlugins" target="_top">vim.optPlugins</a> are now
|
||||||
an enum of <code class="literal">string</code> for options sourced from the flake inputs. Users can still provide vim
|
an enum of <code class="literal">string</code> for options sourced from the flake inputs. Users can still provide vim
|
||||||
plugin packages.</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: circle;"><li class="listitem"><p>If you are contributing and adding a new plugin, add the plugin name to <code class="literal">availablePlugins</code> in
|
plugin packages.</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: circle;"><li class="listitem"><p>If you are contributing and adding a new plugin, add the plugin name to <code class="literal">availablePlugins</code> in
|
||||||
|
@ -39,7 +40,7 @@ This allows for ordering of the config. Usage is the same is in home-manager’s
|
||||||
<a class="link" href="opt-vim.statusline.lualine.theme" target="_top">vim.statusline.lualine.theme</a>.</p></li></ul></div>
|
<a class="link" href="opt-vim.statusline.lualine.theme" target="_top">vim.statusline.lualine.theme</a>.</p></li></ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 class="title" > <a id="sec-release-0.2"></a>Release 0.2 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.2-changelog">Changelog</a> </span></dt> </dl></div><p>Release notes for release 0.2</p><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-release-0.2-changelog"></a>Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added two minimap plugins under <code class="literal">vim.minimap</code>. <code class="literal">codewindow.nvim</code> is enabled by default, while <code class="literal">minimap.vim</code> is
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.2" class="title" >Release 0.2 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.2-changelog">Changelog</a> </span></dt> </dl></div><p>Release notes for release 0.2</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.2-changelog" class="title" style="clear: both">Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added two minimap plugins under <code class="literal">vim.minimap</code>. <code class="literal">codewindow.nvim</code> is enabled by default, while <code class="literal">minimap.vim</code> is
|
||||||
available with its code-minimap dependency.</p></li><li class="listitem"><p>A complementary plugin, <code class="literal">obsidian.nvim</code> and the Neovim alternative for Emacs’ orgmode with <code class="literal">orgmode.nvim</code> have been
|
available with its code-minimap dependency.</p></li><li class="listitem"><p>A complementary plugin, <code class="literal">obsidian.nvim</code> and the Neovim alternative for Emacs’ orgmode with <code class="literal">orgmode.nvim</code> have been
|
||||||
added. Both will be disabled by default.</p></li><li class="listitem"><p>Smooth scrolling for ANY movement command is now available with <code class="literal">cinnamon.nvim</code></p></li><li class="listitem"><p>You will now notice a dashboard on startup. This is provided by the <code class="literal">alpha.nvim</code> plugin. You can use any of the
|
added. Both will be disabled by default.</p></li><li class="listitem"><p>Smooth scrolling for ANY movement command is now available with <code class="literal">cinnamon.nvim</code></p></li><li class="listitem"><p>You will now notice a dashboard on startup. This is provided by the <code class="literal">alpha.nvim</code> plugin. You can use any of the
|
||||||
three available dashboard plugins, or disable them entirely.</p></li><li class="listitem"><p>There is now a scrollbar on active buffers, which can highlight errors by hooking to your LSPs. This is on by
|
three available dashboard plugins, or disable them entirely.</p></li><li class="listitem"><p>There is now a scrollbar on active buffers, which can highlight errors by hooking to your LSPs. This is on by
|
||||||
|
@ -53,10 +54,10 @@ problematic at the moment.</p></li><li class="listitem"><p>Most of NvimTree’s
|
||||||
a single module gets its directory to be imported.</p></li><li class="listitem"><p>Separate config options with the same parent attribute have been merged into one for simplicity.</p></li></ul></div>
|
a single module gets its directory to be imported.</p></li><li class="listitem"><p>Separate config options with the same parent attribute have been merged into one for simplicity.</p></li></ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 class="title" > <a id="sec-release-0.3"></a>Release 0.3 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.3-changelog">Changelog</a> </span></dt> </dl></div><p>Release 0.3 had to come out beore I wanted it to due to Neovim 0.9 dropping into nixpkgs-unstable.
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.3" class="title" >Release 0.3 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.3-changelog">Changelog</a> </span></dt> </dl></div><p>Release 0.3 had to come out beore I wanted it to due to Neovim 0.9 dropping into nixpkgs-unstable.
|
||||||
The treesitter changes have prompted a treesitter rework, which was followed by reworking the languages system.
|
The treesitter changes have prompted a treesitter rework, which was followed by reworking the languages system.
|
||||||
Most of the changes to those are downstreamed from the original repository. The feature requests that was originally
|
Most of the changes to those are downstreamed from the original repository. The feature requests that was originally
|
||||||
planned for 0.3 have been moved to 0.4, which should come out soon.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-release-0.3-changelog"></a>Changelog </h2> </div> </div></div><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>We have transitioned to flake-parts, from flake-utils to extend the flexibility of this flake. This means the flake structure
|
planned for 0.3 have been moved to 0.4, which should come out soon.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.3-changelog" class="title" style="clear: both">Changelog </h2> </div> </div></div><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>We have transitioned to flake-parts, from flake-utils to extend the flexibility of this flake. This means the flake structure
|
||||||
is different than usual, but the functionality remains the same.</p></li><li class="listitem"><p>We now provide a home-manager module. Do note that it is still far from perfect, but it works.</p></li><li class="listitem"><p><code class="literal">nodejs_16</code> is now bundled with <code class="literal">Copilot.lua</code> if the user has enabled Copilot assistant.</p></li><li class="listitem"><p>which-key section titles have been fixed. This is to be changed once again in a possible keybind rewrite, but now it should
|
is different than usual, but the functionality remains the same.</p></li><li class="listitem"><p>We now provide a home-manager module. Do note that it is still far from perfect, but it works.</p></li><li class="listitem"><p><code class="literal">nodejs_16</code> is now bundled with <code class="literal">Copilot.lua</code> if the user has enabled Copilot assistant.</p></li><li class="listitem"><p>which-key section titles have been fixed. This is to be changed once again in a possible keybind rewrite, but now it should
|
||||||
display the correct titles instad of <code class="literal">+prefix</code></p></li><li class="listitem"><p>Most of <code class="literal">presence.nvim</code>’s options have been made fully configurable through your configuration file.</p></li><li class="listitem"><p>Most of the modules have been refactored to separate <code class="literal">config</code> and <code class="literal">options</code> attributes.</p></li><li class="listitem"><p>Darwin has been deprecated as the zig package is marked as broken. We will attempt to use the zig overlay to return Darwin
|
display the correct titles instad of <code class="literal">+prefix</code></p></li><li class="listitem"><p>Most of <code class="literal">presence.nvim</code>’s options have been made fully configurable through your configuration file.</p></li><li class="listitem"><p>Most of the modules have been refactored to separate <code class="literal">config</code> and <code class="literal">options</code> attributes.</p></li><li class="listitem"><p>Darwin has been deprecated as the zig package is marked as broken. We will attempt to use the zig overlay to return Darwin
|
||||||
support.</p></li><li class="listitem"><p><code class="literal">Fidget.nvim</code> has been added as a neat visual addition for LSP installations.</p></li><li class="listitem"><p><code class="literal">diffview.nvim</code> has been added to provide a convenient diff utility.</p></li><li class="listitem"><p>Treesitter grammars are now configurable with <a class="link" href="vim.treesitter.grammars" target="_top">vim.treesitter.grammars</a>.
|
support.</p></li><li class="listitem"><p><code class="literal">Fidget.nvim</code> has been added as a neat visual addition for LSP installations.</p></li><li class="listitem"><p><code class="literal">diffview.nvim</code> has been added to provide a convenient diff utility.</p></li><li class="listitem"><p>Treesitter grammars are now configurable with <a class="link" href="vim.treesitter.grammars" target="_top">vim.treesitter.grammars</a>.
|
||||||
|
@ -73,14 +74,14 @@ language support.</p></li><li class="listitem"><p>Elixir language support has be
|
||||||
per-buftype column position and more.</p></li><li class="listitem"><p><code class="literal">project.nvim</code> has been added for better project management inside Neovim.</p></li><li class="listitem"><p>More configuration options have been added to <code class="literal">nvim-session-manager</code>.</p></li><li class="listitem"><p>Editorconfig support has been added to the core functionality, with an enable option.</p></li><li class="listitem"><p><code class="literal">venn-nvim</code> has been dropped due to broken keybinds.</p></li></ul></div>
|
per-buftype column position and more.</p></li><li class="listitem"><p><code class="literal">project.nvim</code> has been added for better project management inside Neovim.</p></li><li class="listitem"><p>More configuration options have been added to <code class="literal">nvim-session-manager</code>.</p></li><li class="listitem"><p>Editorconfig support has been added to the core functionality, with an enable option.</p></li><li class="listitem"><p><code class="literal">venn-nvim</code> has been dropped due to broken keybinds.</p></li></ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 class="title" > <a id="sec-release-0.4"></a>Release 0.4 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.4-changelog">Changelog</a> </span></dt> </dl></div><p>Following the release of v0.3, I have decided to release v0.4 with a massive new change: customizable keybinds.
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.4" class="title" >Release 0.4 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.4-changelog">Changelog</a> </span></dt> </dl></div><p>Following the release of v0.3, I have decided to release v0.4 with a massive new change: customizable keybinds.
|
||||||
As of the 0.4 release, keybinds will no longer be hardcoded and instead provided by each module’s own keybinds section.
|
As of the 0.4 release, keybinds will no longer be hardcoded and instead provided by each module’s own keybinds section.
|
||||||
The old keybind system (<code class="literal">vim.keybinds = {}</code>) is now considered deprecated and the new lib functions are recommended to be
|
The old keybind system (<code class="literal">vim.keybinds = {}</code>) is now considered deprecated and the new lib functions are recommended to be
|
||||||
used for adding keybinds for new plugins, or adding keybinds to existing plugins.</p><p>Alongside customizable keybinds, there are a few quality of life updates, such as <code class="literal">lazygit</code> integration and the
|
used for adding keybinds for new plugins, or adding keybinds to existing plugins.</p><p>Alongside customizable keybinds, there are a few quality of life updates, such as <code class="literal">lazygit</code> integration and the
|
||||||
new experimental Lua loader of Neovim 0.9 thanks to our awesome contributors who made this update possible during my absence.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-release-0.4-changelog"></a>Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/n3oney" target="_top">n3oney</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Streamlined keybind adding process towards new functions in extended stdlib.</p></li><li class="listitem"><p>Moved default keybinds into keybinds section of each module</p></li><li class="listitem"><p>Simplified luaConfigRC and configRC setting - they can now just take strings</p></li><li class="listitem"><p>Refactored the resolveDag function - you can just provide a string now, which will default to dag.entryAnywhere</p></li><li class="listitem"><p>Fixed formatting sometimes removing parts of files</p></li><li class="listitem"><p>Made formatting synchronous</p></li><li class="listitem"><p>Gave null-ls priority over other formatters</p></li></ul></div><p><a class="link" href="https://github.com/horriblename" target="_top">horriblename</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added <code class="literal">clangd</code> as alternative lsp for C/++.</p></li><li class="listitem"><p>Added <code class="literal">toggleterm</code> integration for <code class="literal">lazygit</code>.</p></li><li class="listitem"><p>Added new option <code class="literal">enableluaLoader</code> to enable neovim’s experimental module loader for faster startup time.</p></li><li class="listitem"><p>Fixed bug where flutter-tools can’t find <code class="literal">dart</code> LSP</p></li><li class="listitem"><p>Added Debug Adapter (DAP) support for clang, rust, go, python and dart.</p></li></ul></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Made Copilot’s Node package configurable. It is recommended to keep as default, but providing a different NodeJS version is now possible.</p></li><li class="listitem"><p>Added <a class="link" href="vim.cursorlineOpt" target="_top">vim.cursorlineOpt</a> for configuring Neovim’s cursorlineOpt.</p></li><li class="listitem"><p>Added <code class="literal">filetree.nvimTreeLua.view.cursorline</code>, default false, to enable cursorline in nvimtre.</p></li><li class="listitem"><p>Added Fidget.nvim support for the Catppuccin theme.</p></li><li class="listitem"><p>Updated bundled NodeJS version used by <code class="literal">Copilot.lua</code>. v16 is now marked as insecure on Nixpkgs, and we updated to v18</p></li><li class="listitem"><p>Enabled Catppuccin modules for plugins available by default.</p></li><li class="listitem"><p>Added experimental Svelte support under <code class="literal">vim.languages</code>.</p></li><li class="listitem"><p>Removed unnecessary scrollbar element from notifications and codeaction warning UI.</p></li><li class="listitem"><p><code class="literal">vim.utility.colorizer</code> has been renamed to <code class="literal">vim.utility.ccc</code> after the plugin it uses</p></li><li class="listitem"><p>Color preview via <code class="literal">nvim-colorizer.lua</code></p></li><li class="listitem"><p>Updated Lualine statusline UI</p></li><li class="listitem"><p>Added vim-illuminate for smart highlighting</p></li><li class="listitem"><p>Added a module for enabling Neovim’s spellchecker</p></li><li class="listitem"><p>Added prettierd as an alternative formatter to prettier - currently defaults to prettier</p></li><li class="listitem"><p>Fixed presence.nvim inheriting the wrong client id</p></li><li class="listitem"><p>Cleaned up documentation</p></li></ul></div>
|
new experimental Lua loader of Neovim 0.9 thanks to our awesome contributors who made this update possible during my absence.</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.4-changelog" class="title" style="clear: both">Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/n3oney" target="_top">n3oney</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Streamlined keybind adding process towards new functions in extended stdlib.</p></li><li class="listitem"><p>Moved default keybinds into keybinds section of each module</p></li><li class="listitem"><p>Simplified luaConfigRC and configRC setting - they can now just take strings</p></li><li class="listitem"><p>Refactored the resolveDag function - you can just provide a string now, which will default to dag.entryAnywhere</p></li><li class="listitem"><p>Fixed formatting sometimes removing parts of files</p></li><li class="listitem"><p>Made formatting synchronous</p></li><li class="listitem"><p>Gave null-ls priority over other formatters</p></li></ul></div><p><a class="link" href="https://github.com/horriblename" target="_top">horriblename</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added <code class="literal">clangd</code> as alternative lsp for C/++.</p></li><li class="listitem"><p>Added <code class="literal">toggleterm</code> integration for <code class="literal">lazygit</code>.</p></li><li class="listitem"><p>Added new option <code class="literal">enableluaLoader</code> to enable neovim’s experimental module loader for faster startup time.</p></li><li class="listitem"><p>Fixed bug where flutter-tools can’t find <code class="literal">dart</code> LSP</p></li><li class="listitem"><p>Added Debug Adapter (DAP) support for clang, rust, go, python and dart.</p></li></ul></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Made Copilot’s Node package configurable. It is recommended to keep as default, but providing a different NodeJS version is now possible.</p></li><li class="listitem"><p>Added <a class="link" href="vim.cursorlineOpt" target="_top">vim.cursorlineOpt</a> for configuring Neovim’s cursorlineOpt.</p></li><li class="listitem"><p>Added <code class="literal">filetree.nvimTreeLua.view.cursorline</code>, default false, to enable cursorline in nvimtre.</p></li><li class="listitem"><p>Added Fidget.nvim support for the Catppuccin theme.</p></li><li class="listitem"><p>Updated bundled NodeJS version used by <code class="literal">Copilot.lua</code>. v16 is now marked as insecure on Nixpkgs, and we updated to v18</p></li><li class="listitem"><p>Enabled Catppuccin modules for plugins available by default.</p></li><li class="listitem"><p>Added experimental Svelte support under <code class="literal">vim.languages</code>.</p></li><li class="listitem"><p>Removed unnecessary scrollbar element from notifications and codeaction warning UI.</p></li><li class="listitem"><p><code class="literal">vim.utility.colorizer</code> has been renamed to <code class="literal">vim.utility.ccc</code> after the plugin it uses</p></li><li class="listitem"><p>Color preview via <code class="literal">nvim-colorizer.lua</code></p></li><li class="listitem"><p>Updated Lualine statusline UI</p></li><li class="listitem"><p>Added vim-illuminate for smart highlighting</p></li><li class="listitem"><p>Added a module for enabling Neovim’s spellchecker</p></li><li class="listitem"><p>Added prettierd as an alternative formatter to prettier - currently defaults to prettier</p></li><li class="listitem"><p>Fixed presence.nvim inheriting the wrong client id</p></li><li class="listitem"><p>Cleaned up documentation</p></li></ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 class="title" > <a id="sec-release-0.5"></a>Release 0.5 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.5-changelog">Changelog</a> </span></dt> </dl></div><p>Release notes for release 0.5</p><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-release-0.5-changelog"></a>Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/vagahbond" target="_top">vagahbond</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added phan language server for PHP</p></li><li class="listitem"><p>Added phpactor language server for PHP</p></li></ul></div><p><a class="link" href="https://github.com/horriblename" target="_top">horriblename</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added transparency support for tokyonight theme</p></li><li class="listitem"><p>Fixed a bug where cmp’s close and scrollDocs mappings wasn’t working</p></li><li class="listitem"><p>Streamlined and simplified extra plugin API with the addition of <a class="link" href="vim.extraPlugins" target="_top">vim.extraPlugins</a></p></li><li class="listitem"><p>Allow using command names in place of LSP packages to avoid automatic installation</p></li><li class="listitem"><p>Add lua LSP and treesitter support, and neodev.nvim plugin support</p></li><li class="listitem"><p>Add <a class="link" href="vim.lsp.mappings.toggleFormatOnSave" target="_top">vim.lsp.mappings.toggleFormatOnSave</a> keybind</p></li></ul></div><p><a class="link" href="https://github.com/amanse" target="_top">amanse</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added daily notes options for obsidian plugin</p></li><li class="listitem"><p>Added jdt-language-server for Java</p></li></ul></div><p><a class="link" href="https://github.com/yavko" target="_top">yavko</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added Deno Language Server for javascript/typescript</p></li><li class="listitem"><p>Added support for multiple languages <a class="link" href="vim.spellChecking.languages" target="_top">vim.spellChecking.languages</a>, and added
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.5" class="title" >Release 0.5 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.5-changelog">Changelog</a> </span></dt> </dl></div><p>Release notes for release 0.5</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.5-changelog" class="title" style="clear: both">Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/vagahbond" target="_top">vagahbond</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added phan language server for PHP</p></li><li class="listitem"><p>Added phpactor language server for PHP</p></li></ul></div><p><a class="link" href="https://github.com/horriblename" target="_top">horriblename</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added transparency support for tokyonight theme</p></li><li class="listitem"><p>Fixed a bug where cmp’s close and scrollDocs mappings wasn’t working</p></li><li class="listitem"><p>Streamlined and simplified extra plugin API with the addition of <a class="link" href="vim.extraPlugins" target="_top">vim.extraPlugins</a></p></li><li class="listitem"><p>Allow using command names in place of LSP packages to avoid automatic installation</p></li><li class="listitem"><p>Add lua LSP and treesitter support, and neodev.nvim plugin support</p></li><li class="listitem"><p>Add <a class="link" href="vim.lsp.mappings.toggleFormatOnSave" target="_top">vim.lsp.mappings.toggleFormatOnSave</a> keybind</p></li></ul></div><p><a class="link" href="https://github.com/amanse" target="_top">amanse</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added daily notes options for obsidian plugin</p></li><li class="listitem"><p>Added jdt-language-server for Java</p></li></ul></div><p><a class="link" href="https://github.com/yavko" target="_top">yavko</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added Deno Language Server for javascript/typescript</p></li><li class="listitem"><p>Added support for multiple languages <a class="link" href="vim.spellChecking.languages" target="_top">vim.spellChecking.languages</a>, and added
|
||||||
vim-dirtytalk through <a class="link" href="vim.spellChecking.enableProgrammingWordList" target="_top">vim.spellChecking.enableProgrammingWordList</a></p></li></ul></div><p><a class="link" href="https://github.com/FrothyMarrow" target="_top">frothymarrow</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Renamed <code class="literal">vim.visuals.cursorWordline</code> to <a class="link" href="vim.visuals.cursorline.enable" target="_top">vim.visuals.cursorline.enable</a></p></li><li class="listitem"><p>Added <a class="link" href="vim.visuals.cursorline.lineNumbersOnly" target="_top">vim.visuals.cursorline.lineNumbersOnly</a> to display cursorline
|
vim-dirtytalk through <a class="link" href="vim.spellChecking.enableProgrammingWordList" target="_top">vim.spellChecking.enableProgrammingWordList</a></p></li></ul></div><p><a class="link" href="https://github.com/FrothyMarrow" target="_top">frothymarrow</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Renamed <code class="literal">vim.visuals.cursorWordline</code> to <a class="link" href="vim.visuals.cursorline.enable" target="_top">vim.visuals.cursorline.enable</a></p></li><li class="listitem"><p>Added <a class="link" href="vim.visuals.cursorline.lineNumbersOnly" target="_top">vim.visuals.cursorline.lineNumbersOnly</a> to display cursorline
|
||||||
only in the presence of line numbers</p></li><li class="listitem"><p>Added Oxocarbon to the list of available themes.</p></li></ul></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added GitHub Copilot to nvim-cmp completion sources.</p></li><li class="listitem"><p>Added <a class="link" href="vim.ui.borders.enable" target="_top">vim.ui.borders.enable</a> for global and individual plugin border configuration.</p></li><li class="listitem"><p>LSP integrated breadcrumbs with <a class="link" href="vim.ui.breadcrumbs.enable" target="_top">vim.ui.breadcrumbs.enable</a> through nvim-navic</p></li><li class="listitem"><p>LSP navigation helper with nvim-navbuddy, depends on nvim-navic (automatically enabled if navic is enabled)</p></li><li class="listitem"><p>Addeed nvim-navic integration for catppuccin theme</p></li><li class="listitem"><p>Fixed mismatching zig language description</p></li><li class="listitem"><p>Added support for <code class="literal">statix</code> and <code class="literal">deadnix</code> through <a class="link" href="vim.languages.nix.extraDiagnostics.types" target="_top">vim.languages.nix.extraDiagnostics.types</a></p></li><li class="listitem"><p>Added <code class="literal">lsp_lines</code> plugin for showing diagnostic messages</p></li><li class="listitem"><p>Added a configuration option for choosing the leader key</p></li><li class="listitem"><p>The package used for neovim is now customizable by the user, using <a class="link" href="vim.package" target="_top">vim.package</a>.
|
only in the presence of line numbers</p></li><li class="listitem"><p>Added Oxocarbon to the list of available themes.</p></li></ul></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added GitHub Copilot to nvim-cmp completion sources.</p></li><li class="listitem"><p>Added <a class="link" href="vim.ui.borders.enable" target="_top">vim.ui.borders.enable</a> for global and individual plugin border configuration.</p></li><li class="listitem"><p>LSP integrated breadcrumbs with <a class="link" href="vim.ui.breadcrumbs.enable" target="_top">vim.ui.breadcrumbs.enable</a> through nvim-navic</p></li><li class="listitem"><p>LSP navigation helper with nvim-navbuddy, depends on nvim-navic (automatically enabled if navic is enabled)</p></li><li class="listitem"><p>Addeed nvim-navic integration for catppuccin theme</p></li><li class="listitem"><p>Fixed mismatching zig language description</p></li><li class="listitem"><p>Added support for <code class="literal">statix</code> and <code class="literal">deadnix</code> through <a class="link" href="vim.languages.nix.extraDiagnostics.types" target="_top">vim.languages.nix.extraDiagnostics.types</a></p></li><li class="listitem"><p>Added <code class="literal">lsp_lines</code> plugin for showing diagnostic messages</p></li><li class="listitem"><p>Added a configuration option for choosing the leader key</p></li><li class="listitem"><p>The package used for neovim is now customizable by the user, using <a class="link" href="vim.package" target="_top">vim.package</a>.
|
||||||
For best results, always use an unwrapped package</p></li><li class="listitem"><p>Added highlight-undo plugin for highlighting undo/redo targets</p></li><li class="listitem"><p>Added bash LSP and formatter support</p></li><li class="listitem"><p>Disabled Lualine LSP status indicator for toggleterm buffer</p></li><li class="listitem"><p>Added <code class="literal">nvim-docs-view</code>, a plugin to display lsp hover documentation in a side panel</p></li><li class="listitem"><p>Switched to <code class="literal">nixosOptionsDoc</code> in option documentation.
|
For best results, always use an unwrapped package</p></li><li class="listitem"><p>Added highlight-undo plugin for highlighting undo/redo targets</p></li><li class="listitem"><p>Added bash LSP and formatter support</p></li><li class="listitem"><p>Disabled Lualine LSP status indicator for toggleterm buffer</p></li><li class="listitem"><p>Added <code class="literal">nvim-docs-view</code>, a plugin to display lsp hover documentation in a side panel</p></li><li class="listitem"><p>Switched to <code class="literal">nixosOptionsDoc</code> in option documentation.
|
||||||
|
@ -89,14 +90,55 @@ formatting changes, along with better source links.”</p></li><li class="listit
|
||||||
from <code class="literal">attrsOf str</code> to <code class="literal">attrsOf (listOf str)</code></p></li><li class="listitem"><p>Added <code class="literal">statusline.lualine.extraActiveSection</code> and <code class="literal">statusline.lualine.extraInactiveSection</code></p></li></ul></div>
|
from <code class="literal">attrsOf str</code> to <code class="literal">attrsOf (listOf str)</code></p></li><li class="listitem"><p>Added <code class="literal">statusline.lualine.extraActiveSection</code> and <code class="literal">statusline.lualine.extraInactiveSection</code></p></li></ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 class="title" > <a id="sec-release-0.6"></a>Release 0.6 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-release-0.6-changelog">Changelog</a> </span></dt> </dl></div><p>Release notes for release 0.6</p><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-release-0.6-changelog"></a>Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/ksonj" target="_top">ksonj</a>:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Add Terraform language support</p></li></ul></div><p><a class="link" href="https://github.com/horriblename" target="_top">horriblename</a>:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Fixed empty winbar when breadcrumbs are disabled</p></li></ul></div><p><a class="link" href="https://github.com/donnerinoern" target="_top">donnerinoern</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added Gruvbox theme</p></li><li class="listitem"><p>Added marksman LSP for Markdown</p></li><li class="listitem"><p>Fixed markdown preview with Glow not working and added an option for changing the preview keybind</p></li><li class="listitem"><p>colorizer.nvim: switched to a maintained fork</p></li><li class="listitem"><p>Added <code class="literal">markdown-preview.nvim</code>, moved <code class="literal">glow.nvim</code> to a brand new <code class="literal">vim.utility.preview</code> category.</p></li></ul></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Finished moving to <code class="literal">nixosOptionsDoc</code> in the documentation and changelog. We are fully free of asciidoc now</p></li><li class="listitem"><p>Bumped plugin inputs to their latest versions</p></li><li class="listitem"><p>Deprecated <code class="literal">presence.nvim</code> in favor of <code class="literal">neocord</code>. This means <code class="literal">vim.rich-presence.presence-nvim</code> is removed and will throw
|
</div><div class="chapter"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.6" class="title" >Release 0.6 </h2> </div> </div></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="release-notes.html#sec-breaking-changes-and-migration-guide">Breaking Changes and Migration Guide</a> </span></dt><dt> <span class="section"> <a href="release-notes.html#sec-release-0.6-changelog">Changelog</a> </span></dt> </dl></div><p>Release notes for release 0.6</p><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-breaking-changes-and-migration-guide" class="title" style="clear: both">Breaking Changes and Migration Guide </h2> </div> </div></div><p>In v0.6 we are introducing <code class="literal">setupOpts</code>: many plugin related options are moved into their respective <code class="literal">setupOpts</code>
|
||||||
a warning if used. You are recommended to rewrite your neocord config from scratch based on the
|
submodule, e.g. <code class="literal">nvimTree.disableNetrw</code> is renamed to <code class="literal">nvimTree.setupOpts.disable_netrw</code>.</p><p><span class="emphasis"><em>Why?</em></span> in short, you can now pass in anything to setupOpts and it will be passed to your <code class="literal">require'plugin'.setup{...}</code>.
|
||||||
<a class="link" href="https://github.com/IogaMaster/neocord" target="_top">official documentation</a></p></li><li class="listitem"><p>Added support for css and tailwindcss through vscode-language-servers-extracted & tailwind-language-server.
|
No need to wait for us to support every single plugin option.</p><p>The warnings when you rebuild your config should be enough to guide you through what you need to do, if there’s an
|
||||||
Those can be enabled through <code class="literal">vim.languages.css</code> and <code class="literal">vim.languages.tailwind</code></p></li><li class="listitem"><p>Lualine module now allows customizing <code class="literal">always_divide_middle</code>, <code class="literal">ignore_focus</code> and <code class="literal">disabled_filetypes</code> through the new
|
option that was renamed but wasn’t listed in the warning, please file a bug report!</p><p>To make your migration process less annoying, here’s a keybind that will help you with renaming stuff from camelCase to
|
||||||
|
snake_case (you’ll be doing that a lot):</p><pre><code class="programlisting lua">-- paste this in a temp.lua file and load it in vim with :source /path/to/temp.lua
|
||||||
|
function camelToSnake()
|
||||||
|
-- Get the current word under the cursor
|
||||||
|
local word = vim.fn.expand("<cword>")
|
||||||
|
-- Replace each capital letter with an underscore followed by its lowercase equivalent
|
||||||
|
local snakeCase = string.gsub(word, "%u", function(match)
|
||||||
|
return "_" .. string.lower(match)
|
||||||
|
end)
|
||||||
|
-- Remove the leading underscore if present
|
||||||
|
if string.sub(snakeCase, 1, 1) == "_" then
|
||||||
|
snakeCase = string.sub(snakeCase, 2)
|
||||||
|
end
|
||||||
|
vim.fn.setreg(vim.v.register, snakeCase)
|
||||||
|
-- Select the word under the cursor and paste
|
||||||
|
vim.cmd("normal! viwP")
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>a', ':lua camelToSnake()<CR>', { noremap = true, silent = true })
|
||||||
|
</code></pre>
|
||||||
|
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-release-0.6-changelog" class="title" style="clear: both">Changelog </h2> </div> </div></div><p><a class="link" href="https://github.com/ksonj" target="_top">ksonj</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added Terraform language support.</p></li><li class="listitem"><p>Added <code class="literal">ChatGPT.nvim</code>, which can be enabled with <a class="link" href="vim.assistant.chatgpt" target="_top"><code class="literal">vim.assistant.chatgpt</code></a>. Do
|
||||||
|
keep in mind that this option requires <code class="literal">OPENAI_API_KEY</code> environment variable to be set.</p></li></ul></div><p><a class="link" href="https://github.com/donnerinoern" target="_top">donnerinoern</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added Gruvbox theme.</p></li><li class="listitem"><p>Added marksman LSP for Markdown.</p></li><li class="listitem"><p>Fixed markdown preview with Glow not working and added an option for changing the preview keybind.</p></li><li class="listitem"><p>colorizer.nvim: switched to a maintained fork.</p></li><li class="listitem"><p>Added <code class="literal">markdown-preview.nvim</code>, moved <code class="literal">glow.nvim</code> to a brand new <code class="literal">vim.utility.preview</code> category.</p></li></ul></div><p><a class="link" href="https://github.com/elijahimmer" target="_top">elijahimmer</a></p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Added rose-pine theme.</p></li></ul></div><p><a class="link" href="https://github.com/jacekpoz" target="_top">jacekpoz</a>:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Added <code class="literal">vim.autocomplete.alwaysComplete</code>. Allows users to have the autocomplete window popup only when manually activated.</p></li></ul></div><p><a class="link" href="https://github.com/horriblename" target="_top">horriblename</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Fixed empty winbar when breadcrumbs are disabled.</p></li><li class="listitem"><p>Added custom <code class="literal">setupOpts</code> for various plugins.</p></li><li class="listitem"><p>Removed support for deprecated plugin “nvim-compe”.</p></li><li class="listitem"><p>Moved most plugins to <code class="literal">setupOpts</code> method.</p></li></ul></div><p><a class="link" href="https://github.com/frothymarrow" target="_top">frothymarrow</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Added option <code class="literal">vim.luaPackages</code> to wrap neovim with extra Lua packages.</p></li><li class="listitem"><p>Rewrote the entire <code class="literal">fidget.nvim</code> module to include extensive configuration options. Option <code class="literal">vim.fidget-nvim.align.bottom</code> has
|
||||||
|
been removed in favor of <a class="link" href="vim.fidget-nvim.notification.window.align" target="_top">vim.fidget-nvim.notification.window.align</a>, which now supports
|
||||||
|
<code class="literal">top</code> and <code class="literal">bottom</code> values. <code class="literal">vim.fidget-nvim.align.right</code> has no longer any equivalent and also has been removed.</p></li><li class="listitem"><p><code class="literal">which-key.nvim</code> categories can now be customized through <a class="link" href="vim.binds.whichKey.register" target="_top">vim.binds.whichKey.register</a></p></li><li class="listitem"><p>Added <code class="literal">magick</code> to <code class="literal">vim.luaPackages</code> for <code class="literal">image.nvim</code>.</p></li><li class="listitem"><p>Added <code class="literal">alejandra</code> to the default devShell.</p></li><li class="listitem"><p>Migrated neovim-flake to <code class="literal">makeNeovimUnstable</code> wrapper.</p></li></ul></div><p><a class="link" href="https://github.com/notashelf" target="_top">notashelf</a>:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Finished moving to <code class="literal">nixosOptionsDoc</code> in the documentation and changelog. All documentation options
|
||||||
|
and files are fully free of Asciidoc, and will now use Nixpkgs flavored markdown.</p></li><li class="listitem"><p>Bumped plugin inputs to their latest versions.</p></li><li class="listitem"><p>Deprecated <code class="literal">presence.nvim</code> in favor of <code class="literal">neocord</code>. This means <code class="literal">vim.rich-presence.presence-nvim</code> is removed and will throw
|
||||||
|
a warning if used. You are recommended to rewrite your neocord configuration from scratch based on the.
|
||||||
|
<a class="link" href="https://github.com/IogaMaster/neocord" target="_top">official documentation</a></p></li><li class="listitem"><p>Removed Tabnine plugin due to the usage of imperative tarball downloads. If you’d like to see it back, please create an issue.</p></li><li class="listitem"><p>Added support for css and tailwindcss through vscode-language-servers-extracted & tailwind-language-server.
|
||||||
|
Those can be enabled through <code class="literal">vim.languages.css</code> and <code class="literal">vim.languages.tailwind</code>.</p></li><li class="listitem"><p>Lualine module now allows customizing <code class="literal">always_divide_middle</code>, <code class="literal">ignore_focus</code> and <code class="literal">disabled_filetypes</code> through the new
|
||||||
options: <a class="link" href="vim.statusline.lualine.alwaysDivideMiddle" target="_top">vim.statusline.lualine.alwaysDivideMiddle</a>,
|
options: <a class="link" href="vim.statusline.lualine.alwaysDivideMiddle" target="_top">vim.statusline.lualine.alwaysDivideMiddle</a>,
|
||||||
<a class="link" href="vim.statusline.lualine.ignoreFocus" target="_top">vim.statusline.lualine.ignoreFocus</a> and
|
<a class="link" href="vim.statusline.lualine.ignoreFocus" target="_top">vim.statusline.lualine.ignoreFocus</a> and
|
||||||
<a class="link" href="vim.statusline.lualine.disabledFiletypes" target="_top">vim.statusline.lualine.disabledFiletypes</a></p></li><li class="listitem"><p>Updated all plugin inputs to their latest versions (26.01.2024) - this brought minor color changess to the Catppuccin
|
<a class="link" href="vim.statusline.lualine.disabledFiletypes" target="_top">vim.statusline.lualine.disabledFiletypes</a>.</p></li><li class="listitem"><p>Updated all plugin inputs to their latest versions (<span class="strong"><strong>21.04.2024</strong></span>) - this brought minor color changes to the Catppuccin
|
||||||
theme</p></li></ul></div><p><a class="link" href="https://github.com/elijahimmer" target="_top">elijahimmer</a></p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Added rose-pine theme</p></li></ul></div><p><a class="link" href="https://github.com/frothymarrow" target="_top">frothymarrow</a></p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>Added option <code class="literal">vim.luaPackages</code> to wrap neovim with extra Lua packages.</p></li></ul></div>
|
theme.</p></li><li class="listitem"><p>Moved home-manager module entrypoint to <code class="literal">flake/modules</code> and added an experimental Nixos module. This requires further testing
|
||||||
|
before it can be considered ready for use.</p></li><li class="listitem"><p>Made lib calls explicit. E.g. <code class="literal">lib.strings.optionalString</code> instead of <code class="literal">lib.optionalString</code>. This is a pattern expected
|
||||||
|
to be followed by all contributors in the future.</p></li><li class="listitem"><p>Added <code class="literal">image.nvim</code> for image previews.</p></li><li class="listitem"><p>The final neovim package is now exposed. This means you can build the neovim package that will be added to your
|
||||||
|
package list without rebuilding your system to test if your configuration yields a broken package.</p></li><li class="listitem"><p>Changed the tree structure to distinguish between core options and plugin options.</p></li><li class="listitem"><p>Added plugin auto-discovery from plugin inputs. This is mostly from
|
||||||
|
<a class="link" href="https://github.com/jordanisaacs/neovim-flake" target="_top">JordanIsaac’s neovim-flake</a>. Allows contributors to add plugin inputs
|
||||||
|
with the <code class="literal">plugin-</code> prefix to have them automatically discovered for the <code class="literal">plugin</code> type in <code class="literal">lib/types</code>.</p></li><li class="listitem"><p>Moved internal <code class="literal">wrapLuaConfig</code> to the extended library, structured its arguments to take <code class="literal">luaBefore</code>, <code class="literal">luaConfig</code>
|
||||||
|
and <code class="literal">luaAfter</code> as strings, which are then concatted inside a lua block.</p></li><li class="listitem"><p>Added <a class="link" href="vim.luaConfigBefore" target="_top"><code class="literal">vim.luaConfigBefore</code></a> and <a class="link" href="vim.luaConfigAfter" target="_top"><code class="literal">vim.luaConfigAfter</code></a>
|
||||||
|
for inserting verbatim Lua configuration before and after the resolved Lua DAG respectively. Both of those options
|
||||||
|
take strings as the type, so you may read the contents of a Lua file from a given path.</p></li><li class="listitem"><p>Added <a class="link" href="vim.spellChecking.ignoredFiletypes" target="_top"><code class="literal">vim.spellChecking.ignoredFiletypes</code></a>
|
||||||
|
and <a class="link" href="vim.spellChecking.programmingWordlist.enable" target="_top"><code class="literal">vim.spellChecking.programmingWordlist.enable</code></a> for ignoring certain filetypes
|
||||||
|
in spellchecking and enabling <code class="literal">vim-dirtytalk</code> respectively. The previously used <code class="literal">vim.spellcheck.vim-dirtytalk</code> aliases to the latter
|
||||||
|
option.</p></li><li class="listitem"><p>Exposed <code class="literal">withRuby</code>, <code class="literal">withNodeJs</code>, <code class="literal">withPython3</code>, and <code class="literal">python3Packages</code> from the <code class="literal">makeNeovimConfig</code> function under their respective options.</p></li><li class="listitem"><p>Added <a class="link" href="vim.extraPackages" target="_top"><code class="literal">vim.extraPackages</code></a> for appending additional packages to the wrapper PATH, making said packages available
|
||||||
|
while inside the Neovim session.</p></li><li class="listitem"><p>Made treesitter options configurable, and moved <code class="literal">treesitter-context to </code>setupOpts` while it is enabled.</p></li><li class="listitem"><p>Added <code class="literal">vim.notify.nvim-notify.setupOpts.render</code> which takes either a string of enum or
|
||||||
|
a lua function. The default is “compact”, but you may change it according to
|
||||||
|
nvim-notify documentation.</p></li></ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
827
style.css
827
style.css
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue