From 4834db0802b1f9f64a3b81e97e516e80bc26a614 Mon Sep 17 00:00:00 2001 From: hedy Date: Sun, 19 Nov 2023 08:41:42 +0800 Subject: [PATCH] docs: Only show 2nd level headings in TOC --- .nvim.lua | 14 ++++++++++++++ README.md | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 .nvim.lua diff --git a/.nvim.lua b/.nvim.lua new file mode 100644 index 0000000..11b85aa --- /dev/null +++ b/.nvim.lua @@ -0,0 +1,14 @@ +-- https://github.com/hedyhli/markdown-toc.nvim +-- +-- outline.nvim README uses markdown-toc to auto-update the ToC. +-- The following config makes only second level headings be included. + +local ok, mtoc = pcall(require, 'mtoc') +if ok then + mtoc.update_config({ + headings = { + pattern = '^(##)%s+(.+)$', + } + }) +end + diff --git a/README.md b/README.md index c27d5b4..669cf73 100644 --- a/README.md +++ b/README.md @@ -38,29 +38,14 @@ Table of contents * [Installation](#installation) * [Setup](#setup) * [Configuration](#configuration) - * [Terminology](#terminology) - * [Default options](#default-options) - * [Symbols table](#symbols-table) * [Commands](#commands) * [Default keymaps](#default-keymaps) * [Highlights](#highlights) - * [Outline window](#outline-window) - * [Preview window](#preview-window) - * [Other highlight groups](#other-highlight-groups) * [Lua API](#lua-api) * [Tips](#tips) * [Recipes](#recipes) - * [Unfold others](#unfold-others) - * [Auto-jump](#auto-jump) - * [Symbol details](#symbol-details) - * [Line numbers](#line-numbers) - * [Blend cursor with cursorline](#blend-cursor-with-cursorline) - * [Custom icons](#custom-icons) - * [Disable icons](#disable-icons) * [TODO](#todo) * [Limitations](#limitations) - * [Preview window](#preview-window-1) - * [Many outlines](#many-outlines) * [Related plugins](#related-plugins)