From 363e3232c748e82297552486631f9af4f8f51eaa Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Thu, 2 Dec 2021 19:55:58 -0800 Subject: [PATCH] doc: add a TOC to the readme --- .github/update_readme.py | 4 +++- README.md | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/update_readme.py b/.github/update_readme.py index d2aa767..c87774f 100755 --- a/.github/update_readme.py +++ b/.github/update_readme.py @@ -80,7 +80,9 @@ def main() -> None: get_config_lines[i] = "```lua\n" break get_config_lines.append("```\n") - replace_section(README, r"^## Custom config", r"^#", indent(get_config_lines, -4)) + replace_section( + README, r"^## Advanced configuration", r"^#", indent(get_config_lines, -4) + ) if __name__ == "__main__": diff --git a/README.md b/README.md index ac13701..9becd54 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,13 @@ respects will be respected, and we will not accept any custom parameters or options in the functions. Customization will be done entirely using a separate [configuration](#configuration) method. +* [Requirements](#requirements) +* [Screenshots](#screenshots) +* [Installation](#installation) +* [Configuration](#configuration) +* [Advanced configuration](#advanced-configuration) +* [Similar projects](#similar-projects) + ## Requirements Neovim 0.5+ @@ -172,7 +179,7 @@ require('dressing').setup({ }) ``` -## Custom config per usage +## Advanced configuration For each of the `input` and `select` configs, there is an option `get_config`. This can be a function that accepts the `opts` parameter that is passed in to `vim.select` or `vim.input`. It must return either `nil` (to