From 7443f0a470fb057c6ccd7a5f78370e3d9135e400 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 3 Feb 2025 15:18:27 +0300 Subject: [PATCH] docs/manual: release TOC depth --- docs/manual.nix | 2 +- docs/manual/options.md | 2 +- docs/manual/tips/pure-lua-config.md | 21 ++++++++------------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/docs/manual.nix b/docs/manual.nix index 4becdf2d..50a5dab4 100644 --- a/docs/manual.nix +++ b/docs/manual.nix @@ -102,7 +102,7 @@ in --script script/anchor-use.js \ --script script/anchor-min.js \ --script script/search.js \ - --toc-depth 2 \ + --toc-depth 1 \ --section-toc-depth 1 \ manual.md \ "$dest/index.xhtml" diff --git a/docs/manual/options.md b/docs/manual/options.md index b386347d..61282dfa 100644 --- a/docs/manual/options.md +++ b/docs/manual/options.md @@ -1,4 +1,4 @@ -# Neovim Flake Configuration Options {#ch-options} +# nvf Configuration Options {#ch-options} Below are the module options provided by nvf, in no particular order. Most options will include useful comments, warnings or setup tips on how a module diff --git a/docs/manual/tips/pure-lua-config.md b/docs/manual/tips/pure-lua-config.md index f31d4220..bf84888b 100644 --- a/docs/manual/tips/pure-lua-config.md +++ b/docs/manual/tips/pure-lua-config.md @@ -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", " ", "", { 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.