</p></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-try-it-out"></a>Chapter1.Try it out</h1></div></div></div><preclass="programlisting console">$ cachix use neovim-flake # Optional: it'll save you CPU resources and time
$ nix run github:notashelf/neovim-flake</pre><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="_nix"></a>1.1.Nix</h2></div></div></div><p>By default LSP support for Nix is enabled alongside all complementary Neovim plugins. By running <codeclass="literal">nix run .</code>, which is the default package,
you will build Neovim with this config.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="_tidal"></a>1.2.Tidal</h2></div></div></div><p>Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="_maximal"></a>1.3.Maximal</h2></div></div></div><p>Maximal is the ultimate configuration that will enable basically everything. Keep in mind, however, that this will pull a lot of dependencies.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="_using_prebuilt_configs"></a>1.4.Using Prebuilt Configs</h2></div></div></div><preclass="programlisting console">$ nix run github:notashelf/neovim-flake#nix
$ nix run github:notashelf/neovim-flake#tidal
$ nix run github:notashelf/neovim-flake#maximal</pre></div></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-default-configs"></a>Chapter2.Default Configs</h1></div></div></div><p>While you can configure neovim-flake yourself using the builder, here are a few default configurations you can use.</p><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-default-tidal"></a>2.1.Tidal Cycles</h2></div></div></div><preclass="programlisting console">$ nix run github:notashelf/neovim-flake#tidal file.tidal</pre><p>Utilizing <aclass="link"href="https://github.com/tidalcycles/vim-tidal"target="_top">vim-tidal</a> and mitchmindtree’s fantastic <aclass="link"href="https://github.com/mitchmindtree/tidalcycles.nix"target="_top">tidalcycles.nix</a> start playing with tidal cycles in a single command.</p><p>In your tidal file, type a cycle e.g. <codeclass="literal">d1 $ s "drum"</code> and then press <spanclass="emphasis"><em>ctrl+enter</em></span>. Super collider with superdirt, and a modified GHCI with tidal will start up and begin playing. Note, you need jack enabled on your system. If you are using pipewire, its as easy as setting <codeclass="literal">services.pipewire.jack.enable = true</code>.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-default-nix"></a>2.2.Nix</h2></div></div></div><preclass="programlisting console">$ nix run github:notashelf/neovim-flake#nix test.nix</pre><p>Enables all the of neovim plugins, with language support for specifically Nix. This lets you see what a fully configured neovim setup looks like without downloading a whole bunch of language servers and associated tools.</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-default-maximal"></a>2.3.Maximal</h2></div></div></div><preclass="programlisting console">$ nix shell github:notashelf/neovim-flake#maximal test.nix</pre><p>It is the same fully configured neovim as with the <aclass="link"href="index.html#sec-default-nix"title="2.2.Nix">Nix</a> config, but with every supported language enabled.</p><divclass="note"><h3class="title">Note</h3><p>Running the maximal config will download <spanclass="strong"><strong>a lot</strong></span> of packages as it is downloading language servers, formatters, and more.</p></div></div></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-custom-configuration"></a>Chapter3.Custom Configuration</h1></div></div></div><p>Custom configuration is done with the <codeclass="literal">neovimConfiguration</code> function. It takes in the configuration as a module. The output of the configuration function is an attrset.</p><preclass="programlisting nix">{
}</pre></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-hm-module"></a>Chapter4.Home Manager</h1></div></div></div><p>The Home Manager module allows us to customize the different <codeclass="literal">vim</code> options. To use it, we first add the input flake.</p><preclass="programlisting nix">{
neovim-flake = {
url = github:notashelf/neovim-flake;
# you can override input nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
}</pre><p>Followed by importing the HM module.</p><preclass="programlisting nix">{
}</pre><p>Then we should be able to use the given module. E.g.</p><preclass="programlisting nix">{
programs.neovim-flake = {
enable = true;
settings = {
vim.viAlias = false;
vim.vimAlias = true;
vim.lsp = {
enable = true;
};
};
};
}</pre></div><divclass="chapter"><divclass="titlepage"><div><div><h1class="title"><aid="ch-languages"></a>Chapter5.Language Support</h1></div></div></div><p>Language specific support combines some combination of language specific plugins, <codeclass="literal">treesitter</code> support, <codeclass="literal">nvim-lspconfig</code> langauge servers, and <codeclass="literal">null-ls</code> integration. This gets you capabilities ranging from autocompletion to formatting to diagnostics. The following languages have support beyond just <codeclass="literal">treesitter</code> highlighting.</p><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-languages-rust"></a>5.1.Rust</h2></div></div></div><p><spanclass="strong"><strong>LSP Server</strong></span>: <aclass="link"href="https://github.com/rust-analyzer/rust-analyzer"target="_top">rust-analyzer</a></p><p><spanclass="strong"><strong>Formatting</strong></span>: Built into LSP, uses <aclass="link"href="https://github.com/rust-lang/rustfmt"target="_top">rustfmt</a></p><p><spanclass="strong"><strong>Plugins</strong></span>: See <aclass="link"href="index.html#sec-plugins-rust"title="6.24.Rust">here</a></p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-languages-nix"></a>5.2.Nix</h2></div></div></div><p><spanclass="strong"><strong>LSP Server</strong></span>: Choice between <aclass="link"href="https://github.com/oxalica/nil"target="_top">nil</a> and <aclass="link"href="https://github.com/nix-community/rnix-lsp"target="_top">rnix-lsp</a></p><p><spanclass="strong"><strong>Formatting</strong></span>: Choice between <aclass="link"href="https://github.com/kamadorueda/alejandra"target="_top">alejandra</a> and <aclass="link"href="https://github.com/nix-community/nixpkgs-fmt"target="_top">nixpkgs-fmt</a></p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-languages-sql"></a>5.3.SQL</h2></div></div></div><p><spanclass="strong"><strong>LSP Server</strong></span>: <aclass="link"href="https://github.com/lighttiger2505/sqls"target="_top">sqls</a></p><p><spanclass="strong"><strong>Formatting</strong></span>: Disabled LSP formatting, instead using <aclass="link"href="https://github.com/sqlfluff/sqlfluff"target="_top">sqlfluff</a></p><p><spanclass="strong"><strong>Linting</strong></span>: <aclass="link"href="https://github.com/sqlfluff/sqlfluff"target="_top">sqlfluff</a></p><p><spanclass="strong"><strong>Plugins</strong></span>: See <aclass="link"href="index.html#sec-plugins-sql"title="6.26.SQL">here</a></p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-languages-clang"></a>5.4.C/C++</h2></div></div></div><p><spanclass="strong"><strong>LSP Server</strong></span>: <aclass="link"href="https://github.com/MaskRay/ccls"target="_top">ccls</a></p><p><spanclass="strong"><strong>Formatting</strong></span>: Built into language server</p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-languages-typescript"></a>5.5.Typescript</h2></div></div></div><p><spanclass="strong"><strong>LSP Server</strong></span>: <aclass="link"href="https://github.com/typescript-language-server/typescript-language-server"target="_top">typescript-language-server</a></p><p><spanclass="strong"><strong>Formatting</strong></span>: Disabled LSP formatting, instead using <aclass="link"href="https://github.com/prettier/prettier"target="_top">prettier</a></p><p><spanclass="strong"><strong>Linting</strong></span>: <aclass="link"href="https://github.com/prettier/prettier"target="_top">eslint</a></p></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="sec-languages-python"></a>5.6.Python</h2></div></div></div><p><spanclass="strong"><strong>LSP Server</strong></span>: <aclass="link"href="https://github.com/microsoft/pyrig
<aclass="link"href="https://github.com/zbirenbaum/copilot.lua"target="_top">copilot.lua</a> a lua replacement for github.vim, the license nightmare AI assistant
</li><liclass="listitem">
<aclass="link"href="https://github.com/codota/tabnine-nvim"target="_top">tabnine-nvim</a> neovim plugin for the more ethically acceptable AI assistant TabNine
<aclass="link"href="https://github.com/b3nj5m1n/kommentary"target="_top">kommentary</a> neovim plugin to comment text in and out, written in lua. Supports commenting out the current line, a visual selection and a motion
</li><liclass="listitem">
<aclass="link"href="https://github.com/folke/todo-comments.nvim"target="_top">todo-comments.nvim</a> plugin to highlight and search for todo comments like TODO, HACK, BUG in your codebase
<aclass="link"href="https://github.com/neovim/nvim-lspconfig"target="_top">nvim-lspconfig</a> common configurations for built-in language server
</li><liclass="listitem">
<aclass="link"href="https://github.com/jose-elias-alvarez/null-ls.nvim"target="_top">null-ls.nvim</a> neovim as a language server to inject LSP diagnostics, code actions, etc.
</li><liclass="listitem">
<aclass="link"href="https://github.com/glepnir/lspsaga.nvim"target="_top">lspsaga.nvim</a> useful UI and tools for lsp
</li><liclass="listitem">
<aclass="link"href="https://github.com/folke/trouble.nvim"target="_top">trouble.nvim</a> pretty list of lsp data
</li><liclass="listitem">
<aclass="link"href="https://github.com/weilbith/nvim-code-action-menu"target="_top">nvim-code-action-menu</a> a better code action menu with diff support
</li><liclass="listitem">
<aclass="link"href="https://github.com/ray-x/lsp_signature.nvim"target="_top">lsp-signature</a> show function signatures as you type
</li><liclass="listitem">
<aclass="link"href="https://github.com/onsails/lspkind-nvim"target="_top">lspkind-nvim</a> for pictograms in lsp (with support for nvim-cmp)
<aclass="link"href="https://github.com/kyazdani42/nvim-web-devicons"target="_top">nvim-web-devicons</a> plugins and colors for icons. Requires patched font
<aclass="link"href="https://github.com/Eandrju/cellular-automaton.nvim"target="_top">cellular-automaton</a> a vanity to plugin to help you procrastinate more efficiently
<aclass="link"href="https://github.com/wfxr/minimap.vim"target="_top">minimap.vim</a> a blazing fast minimap plugin for neovim. Depends on code-minimap
<aclass="link"href="https://github.com/gorbit99/codewindow.nvim"target="_top">codewindow.nvim</a> a simple, configurable minimap plugin for neovim with no external dependencies
<aclass="link"href="https://github.com/rcarriga/nvim-notify"target="_top">nvim-notify</a> simple notification plugin that also integrates with noice.nvim
<aclass="link"href="https://github.com/obsidian.nvim"target="_top">obsidian.nvim</a> a neovim plugin that deeply integrates with the obsidian markdown editor. Also works standalone
</li><liclass="listitem">
<aclass="link"href="https://github.com/nvim-orgmode/orgmode"target="_top">orgmode</a> a neovim replacement for emac orgmode
<aclass="link"href="https://github.com/akinsho/toggleterm.nvim"target="_top">toggleterm.nvim</a> a simple terminal plugin that opens a terminal buffer on demand
<aclass="link"href="https://github.com/nvim-telescope/telescope.nvim"target="_top">telescope</a> an extendable fuzzy finder of lists. Working ripgrep and fd
</li><liclass="listitem">
<aclass="link"href="https://github.com/folke/which-key.nvim"target="_top">which-key</a> a popup that displays possible keybindings of command being typed
</li><liclass="listitem">
<aclass="link"href="https://github.com/sudormrfbin/cheatsheet.nvim"target="_top">cheatsheet.nvim</a> a searchable cheatsheet for neovim from within the editor using Telescope
</li><liclass="listitem">
<aclass="link"href="https://github.com/ga-rosa/ccc.nvim"target="_top">ccc.nvim</a> super powerful color picker and colorizer plugin.
</li><liclass="listitem">
<aclass="link"href="https://github.com/ziontee113/icon-picker.nvim"target="_top">icon-picker.nvim</a> an icon picker plugin that provides access to thousands of icons
<aclass="link"href="https://github.com/folke/noice.nvim"target="_top">noice.nvim</a> an experimental neovim plugin that replaces some UI components of neovim
<aclass="link"href="https://github.com/simrat39/rust-tools.nvim"target="_top">rust-tools</a> provides tools for rust
</li><liclass="listitem">
<aclass="link"href="https://github.com/Saecki/crates.nvim"target="_top">crates.nvim</a> provides tools for working with <codeclass="literal">cargo.toml</code>
<aclass="link"href="https://github.com/nanotee/sqls.nvim"target="_top">sqls.nvim</a> for useful actions that leverage <codeclass="literal">sqls</code> LSP
<aclass="link"href="https://github.com/nvim-lua/plenary.nvim"target="_top">plenary</a> which is a dependency of some plugins, installed automatically if needed