mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-11-03 04:16:36 +00:00 
			
		
		
		
	docs/manual: release TOC depth
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Check for typos in the source tree / check-typos (push) Has been cancelled
				
			
		
		
	
	
		
	
		
			Some checks failed
		
		
	
	Check for typos in the source tree / check-typos (push) Has been cancelled
				
			This commit is contained in:
		
					parent
					
						
							
								c9ac830a2d
							
						
					
				
			
			
				commit
				
					
						7443f0a470
					
				
			
		
					 3 changed files with 10 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
# Pure Lua Configuration {#pure-lua-config}
 | 
			
		||||
# Pure Lua Configuration {#sec-pure-lua-config}
 | 
			
		||||
 | 
			
		||||
We recognize that you might not always want to configure your setup purely in
 | 
			
		||||
Nix, sometimes doing things in Lua is simply the "superior" option. In such a
 | 
			
		||||
| 
						 | 
				
			
			@ -6,15 +6,15 @@ case you might want to configure your Neovim instance using Lua, and nothing but
 | 
			
		|||
Lua. It is also possible to mix Lua and Nix configurations through the following
 | 
			
		||||
method.
 | 
			
		||||
 | 
			
		||||
## Custom Configuration Directory {#custom-config-dir}
 | 
			
		||||
## Custom Configuration Directory {#sec-custom-config-dir}
 | 
			
		||||
 | 
			
		||||
[Neovim 0.9]: https://github.com/neovim/neovim/pull/22128
 | 
			
		||||
 | 
			
		||||
As of [Neovim 0.9], `$NVIM_APPNAME` is a variable expected by Neovim to decide
 | 
			
		||||
on the configuration directory. nvf sets this variable as `"nvf"`, meaning
 | 
			
		||||
`~/.config/nvf` will be regarded as _the_ configuration directory by Neovim,
 | 
			
		||||
similar to how `~/.config/nvim` behaves in regular installations. This allows
 | 
			
		||||
some degree[^1] of Lua configuration, backed by our low-level wrapper
 | 
			
		||||
As of [Neovim 0.9], {var}`$NVIM_APPNAME` is a variable expected by Neovim to
 | 
			
		||||
decide on the configuration directory. nvf sets this variable as `"nvf"`,
 | 
			
		||||
meaning `~/.config/nvf` will be regarded as _the_ configuration directory by
 | 
			
		||||
Neovim, similar to how `~/.config/nvim` behaves in regular installations. This
 | 
			
		||||
allows some degree of Lua configuration, backed by our low-level wrapper
 | 
			
		||||
[mnw](https://github.com/Gerg-L/mnw). Creating a `lua/` directory located in
 | 
			
		||||
`$NVIM_APPNAME` ("nvf" by default) and placing your configuration in, e.g.,
 | 
			
		||||
`~/.config/nvf/lua/myconfig` will allow you to `require` it as a part of the Lua
 | 
			
		||||
| 
						 | 
				
			
			@ -24,6 +24,7 @@ Let's assume your `~/.config/nvf/lua/myconfig/init.lua` consists of the
 | 
			
		|||
following:
 | 
			
		||||
 | 
			
		||||
```lua
 | 
			
		||||
-- init.lua
 | 
			
		||||
vim.keymap.set("n", " ", "<Nop>", { silent = true, remap = false })
 | 
			
		||||
vim.g.mapleader = " "
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			@ -53,9 +54,3 @@ specific position (i.e., before or after options you set in nvf) the
 | 
			
		|||
choosing.
 | 
			
		||||
 | 
			
		||||
[top-level DAG system]: https://notashelf.github.io/nvf/index.xhtml#ch-vim-luaconfigrc
 | 
			
		||||
 | 
			
		||||
[^1]: You might sometimes face "overrides" set by nvf. Those should be very
 | 
			
		||||
    rare, and almost always exclusive to `vim.globals` or `vim.options`. In such
 | 
			
		||||
    a case, simply placing the `require` call for your configuration _after_
 | 
			
		||||
    `optionsScript` in the [top-level DAG system] will allow you to override
 | 
			
		||||
    previous options.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue