mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	deploy: f11912c48f2fb2141db9532d46c9c82f1772c0a9
This commit is contained in:
		
					parent
					
						
							
								15b6d7b4ff
							
						
					
				
			
			
				commit
				
					
						e271247d01
					
				
			
		
					 2 changed files with 770 additions and 751 deletions
				
			
		
							
								
								
									
										45
									
								
								index.html
									
										
									
									
									
								
							
							
						
						
									
										45
									
								
								index.html
									
										
									
									
									
								
							|  | @ -1,5 +1,5 @@ | ||||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||||
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>neovim-flake Manual</title><link rel="stylesheet" type="text/css" href="style.css" /><script src="highlight.min.js" type="text/javascript"></script><script src="highlight.load.js" type="text/javascript"></script><meta name="generator" content="DocBook XSL Stylesheets V1.79.2" /><link rel="home" href="index.html" title="neovim-flake Manual" /><link rel="next" href="options.html" title="Appendix A. Configuration Options" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">neovim-flake Manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="options.html">Next</a></td></tr></table><hr /></div><div class="book"><div class="titlepage"><div><div><h1 class="title"><a id="book-neovim-flake-manual"></a>neovim-flake Manual</h1></div></div><hr /></div><div class="toc"><dl class="toc"><dt><span class="preface"><a href="index.html#id-1.2">Preface</a></span></dt><dt><span class="chapter"><a href="index.html#ch-try-it-out">1. Try it out</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#_nix">1.1. Nix</a></span></dt><dt><span class="section"><a href="index.html#_tidal">1.2. Tidal</a></span></dt><dt><span class="section"><a href="index.html#_maximal">1.3. Maximal</a></span></dt><dt><span class="section"><a href="index.html#_using_prebuilt_configs">1.4. Using Prebuilt Configs</a></span></dt></dl></dd><dt><span class="chapter"><a href="index.html#ch-default-configs">2. Default Configs</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#sec-default-tidal">2.1. Tidal Cycles</a></span></dt><dt><span class="section"><a href="index.html#sec-default-nix">2.2. Nix</a></span></dt><dt><span class="section"><a href="index.html#sec-default-maximal">2.3. Maximal</a></span></dt></dl></dd><dt><span class="chapter"><a href="index.html#ch-custom-configuration">3. Custom Configuration</a></span></dt><dt><span class="chapter"><a href="index.html#ch-custom-plugins">4. Custom Plugins</a></span></dt><dt><span class="chapter"><a href="index.html#ch-hm-module">5. Home Manager</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#_custom_vim_neovim_plugins">5.1. Custom vim/neovim plugins</a></span></dt></dl></dd><dt><span class="chapter"><a href="index.html#ch-languages">6. Language Support</a></span></dt><dt><span class="appendix"><a href="options.html">A. 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="section"><a href="release-notes.html#sec-release-0.1">B.1. Release 0.1</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.1-changelog">B.1.1. Changelog</a></span></dt></dl></dd><dt><span class="section"><a href="release-notes.html#sec-release-0.2">B.2. Release 0.2</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.2-changelog">B.2.1. Changelog</a></span></dt></dl></dd><dt><span class="section"><a href="release-notes.html#sec-release-0.3">B.3. Release 0.3</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.3-changelog">B.3.1. Changelog</a></span></dt></dl></dd><dt><span class="section"><a href="release-notes.html#sec-release-0.4">B.4. Release 0.4</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.4-changelog">B.4.1. Changelog</a></span></dt></dl></dd></dl></dd></dl></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="id-1.2"></a>Preface</h1></div></div></div><p> | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>neovim-flake Manual</title><link rel="stylesheet" type="text/css" href="style.css" /><script src="highlight.min.js" type="text/javascript"></script><script src="highlight.load.js" type="text/javascript"></script><meta name="generator" content="DocBook XSL Stylesheets V1.79.2" /><link rel="home" href="index.html" title="neovim-flake Manual" /><link rel="next" href="options.html" title="Appendix A. Configuration Options" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">neovim-flake Manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="options.html">Next</a></td></tr></table><hr /></div><div class="book"><div class="titlepage"><div><div><h1 class="title"><a id="book-neovim-flake-manual"></a>neovim-flake Manual</h1></div></div><hr /></div><div class="toc"><dl class="toc"><dt><span class="preface"><a href="index.html#id-1.2">Preface</a></span></dt><dt><span class="chapter"><a href="index.html#ch-try-it-out">1. Try it out</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#_nix">1.1. Nix</a></span></dt><dt><span class="section"><a href="index.html#_tidal">1.2. Tidal</a></span></dt><dt><span class="section"><a href="index.html#_maximal">1.3. Maximal</a></span></dt><dt><span class="section"><a href="index.html#_using_prebuilt_configs">1.4. Using Prebuilt Configs</a></span></dt></dl></dd><dt><span class="chapter"><a href="index.html#ch-default-configs">2. Default Configs</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#sec-default-tidal">2.1. Tidal Cycles</a></span></dt><dt><span class="section"><a href="index.html#sec-default-nix">2.2. Nix</a></span></dt><dt><span class="section"><a href="index.html#sec-default-maximal">2.3. Maximal</a></span></dt></dl></dd><dt><span class="chapter"><a href="index.html#ch-custom-configuration">3. Custom Configuration</a></span></dt><dt><span class="chapter"><a href="index.html#ch-custom-plugins">4. Custom Plugins</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#_new_method">4.1. New Method</a></span></dt><dt><span class="section"><a href="index.html#_old_method">4.2. Old Method</a></span></dt></dl></dd><dt><span class="chapter"><a href="index.html#ch-hm-module">5. Home Manager</a></span></dt><dt><span class="chapter"><a href="index.html#ch-languages">6. Language Support</a></span></dt><dt><span class="appendix"><a href="options.html">A. 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="section"><a href="release-notes.html#sec-release-0.1">B.1. Release 0.1</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.1-changelog">B.1.1. Changelog</a></span></dt></dl></dd><dt><span class="section"><a href="release-notes.html#sec-release-0.2">B.2. Release 0.2</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.2-changelog">B.2.1. Changelog</a></span></dt></dl></dd><dt><span class="section"><a href="release-notes.html#sec-release-0.3">B.3. Release 0.3</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.3-changelog">B.3.1. Changelog</a></span></dt></dl></dd><dt><span class="section"><a href="release-notes.html#sec-release-0.4">B.4. Release 0.4</a></span></dt><dd><dl><dt><span class="section"><a href="release-notes.html#sec-release-0.4-changelog">B.4.1. Changelog</a></span></dt></dl></dd></dl></dd></dl></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="id-1.2"></a>Preface</h1></div></div></div><p> | ||||||
|    If your problem is caused by a bug in neovim-flake then it should be reported on the |    If your problem is caused by a bug in neovim-flake then it should be reported on the | ||||||
|    <a class="link" href="https://github.com/notashelf/neovim-flake/issues" target="_top">neovim-flake issue tracker</a>. |    <a class="link" href="https://github.com/notashelf/neovim-flake/issues" target="_top">neovim-flake issue tracker</a>. | ||||||
|    Alongside bug reports, feature requests are also welcome over  |    Alongside bug reports, feature requests are also welcome over  | ||||||
|  | @ -40,8 +40,25 @@ $ nix run github:notashelf/neovim-flake#maximal</pre></div></div><div class="cha | ||||||
|     packages.${system}.neovim = customNeovim.neovim; |     packages.${system}.neovim = customNeovim.neovim; | ||||||
|   }; |   }; | ||||||
| }</pre></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-custom-plugins"></a>Chapter 4. Custom Plugins</h1></div></div></div><p>You can use custom plugins, before they are implemented in the flake. | }</pre></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-custom-plugins"></a>Chapter 4. Custom Plugins</h1></div></div></div><p>You can use custom plugins, before they are implemented in the flake. | ||||||
| To add a plugin, you need to add it to your config’s <code class="literal">config.vim.startPlugins</code> array. | To add a plugin, you need to add it to your config’s <code class="literal">config.vim.startPlugins</code> array.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_new_method"></a>4.1. 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 class="programlisting nix">{ | ||||||
| This is an example of adding the FrenzyExists/aquarium-vim plugin:</p><pre class="programlisting nix">{ |   config.vim.extraPlugins = with pkgs.vimPlugins; { | ||||||
|  |     aerial = { | ||||||
|  |       package = aerial-nvim; | ||||||
|  |       setup = '' | ||||||
|  |         require('aerial').setup { | ||||||
|  |           -- some lua configuration here | ||||||
|  |         } | ||||||
|  |       ''; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     harpoon = { | ||||||
|  |       package = harpoon; | ||||||
|  |       setup = "require('harpoon').setup {}"; | ||||||
|  |       after = ["aerial"]; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | }</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_old_method"></a>4.2. Old Method</h2></div></div></div><p>Users who have not yet updated to 0.5, or prefer a more hands-on approach may use the old method where the load orderof the plugins is determined by DAGs.</p><pre class="programlisting nix">{ | ||||||
|  |   # fetch plugin source from GitHub and add it to startPlugins | ||||||
|   config.vim.startPlugins = [ |   config.vim.startPlugins = [ | ||||||
|     (pkgs.fetchFromGitHub { |     (pkgs.fetchFromGitHub { | ||||||
|       owner = "FrenzyExists"; |       owner = "FrenzyExists"; | ||||||
|  | @ -53,7 +70,7 @@ This is an example of adding the FrenzyExists/aquarium-vim plugin:</p><pre class | ||||||
| }</pre><p>However, just making the plugin available might not 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. | }</pre><p>However, just making the plugin available might not 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 class="programlisting nix">{ | These options are attribute sets, and you need to give the configuration you’re adding some name, like this:</p><pre class="programlisting nix">{ | ||||||
|   config.vim.configRC.aquarium = "colorscheme aquiarum"; |   config.vim.configRC.aquarium = "colorscheme aquiarum"; | ||||||
| }</pre><p>Note: 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 <a class="link" href="https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix" target="_top">https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix</a>.</p><p>Also, if you successfully made your plugin work, please make a PR to add it to the flake, or open an issue with your findings so that we can make it available for everyone easily.</p></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-hm-module"></a>Chapter 5. Home Manager</h1></div></div></div><p>The Home Manager module allows us to customize the different <code class="literal">vim</code> options. To use it, we first add the input flake.</p><pre class="programlisting nix">{ | }</pre><p>Note: 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 <a class="link" href="https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix" target="_top">https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix</a>.</p><p>Also, if you successfully made your plugin work, please make a PR to add it to the flake, or open an issue with your findings so that we can make it available for everyone easily.</p></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-hm-module"></a>Chapter 5. Home Manager</h1></div></div></div><p>The Home Manager module allows us to customize the different <code class="literal">vim</code> options. To use it, we first add the input flake.</p><pre class="programlisting nix">{ | ||||||
|   neovim-flake = { |   neovim-flake = { | ||||||
|     url = github:notashelf/neovim-flake; |     url = github:notashelf/neovim-flake; | ||||||
|     # you can override input nixpkgs |     # you can override input nixpkgs | ||||||
|  | @ -74,25 +91,7 @@ These options are attribute sets, and you need to give the configuration you’r | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| }</pre><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_custom_vim_neovim_plugins"></a>5.1. Custom vim/neovim plugins</h2></div></div></div><p>It is possible to add custom plugins to your configuration by using the <code class="literal">vim.startPlugins</code> option and the this flake’s lua DAG library.</p><p>Start by adding it to startPlugins. This example uses nvim-surround, but the process will be similar for other plugins as well.</p><pre class="programlisting nix">{ | }</pre></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-languages"></a>Chapter 6. Language Support</h1></div></div></div><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" style="list-style-type: disc; "><li class="listitem"> | ||||||
|   programs.neovim-flake = { |  | ||||||
|     enable = true; |  | ||||||
|     settings = { |  | ||||||
|       vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ]; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
| }</pre><p>Followed by requiring the plugin, should it need one, in the lua DAG. Please note that you’re able to name the DAG to however you want, the name will add a <code class="literal">--SECTION <name></code> in the init.vim, under which it will be initialized. <code class="literal">lib.nvim.dag.entryAfter ["name"]</code> could also be used to initialize a plugin only after a previous plugin has beeni initialize |  | ||||||
| Your final setup will likely look like this, where nvim-flake refers to your flake input or fetch.</p><pre class="programlisting nix">{ |  | ||||||
|   programs.neovim-flake = { |  | ||||||
|     enable = true; |  | ||||||
|     settings = { |  | ||||||
|       vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ]; |  | ||||||
|       luaConfigRC.nvim-surround = nvim-flake.lib.nvim.dag.entryAnywhere '' # nvim-flake is a reference to the flake. Please change this accordingly to your config. |  | ||||||
|         require("nvim-surround").setup() |  | ||||||
|       ''; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
| }</pre></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-languages"></a>Chapter 6. Language Support</h1></div></div></div><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" style="list-style-type: disc; "><li class="listitem"> |  | ||||||
| Rust: <a class="xref" href="options.html#opt-vim.languages.rust.enable"><code class="option">vim.languages.rust.enable</code></a> | Rust: <a class="xref" href="options.html#opt-vim.languages.rust.enable"><code class="option">vim.languages.rust.enable</code></a> | ||||||
| </li><li class="listitem"> | </li><li class="listitem"> | ||||||
| Nix: <a class="xref" href="options.html#opt-vim.languages.nix.enable"><code class="option">vim.languages.nix.enable</code></a> | Nix: <a class="xref" href="options.html#opt-vim.languages.nix.enable"><code class="option">vim.languages.nix.enable</code></a> | ||||||
|  |  | ||||||
							
								
								
									
										1462
									
								
								options.html
									
										
									
									
									
								
							
							
						
						
									
										1462
									
								
								options.html
									
										
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 NotAShelf
				NotAShelf