From afc9a37bf021acb0853e95714c4c6436e1588286 Mon Sep 17 00:00:00 2001 From: suwa <43295199+suwuako@users.noreply.github.com> Date: Wed, 2 Oct 2024 08:30:31 +1000 Subject: [PATCH] docs: clarify usage of tweaks and indentation (#1588) Co-authored-by: suwa --- lua/neorg/modules/core/esupports/indent/module.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/neorg/modules/core/esupports/indent/module.lua b/lua/neorg/modules/core/esupports/indent/module.lua index 86ffdd750..9f1f374b8 100644 --- a/lua/neorg/modules/core/esupports/indent/module.lua +++ b/lua/neorg/modules/core/esupports/indent/module.lua @@ -13,6 +13,10 @@ which will get better and better with time. To reindent a file, you may use the inbuilt Neovim `=` operator. Indent levels are also calculated as you type, but may not be entirely correct due to incomplete syntax trees (if you find any such examples, then file an issue!). + +It is also noteworthy that indents add the indentation level to the beginning of the line +and doesn't carry on the indentation level from the previous heading, meaning that if both heading1 +and heading2 have an indentation level of 4, heading2 will not be indented an additional 4 spaces from heading1. --]] local neorg = require("neorg.core") @@ -309,6 +313,9 @@ module.config.public = { -- Tweaks are user defined `node_name` => `indent_level` mappings, -- allowing the user to overwrite the indentation level for certain nodes. + -- + -- Nodes can be found via treesitter's `:InspectTree`. For example, + -- indenting an unordered list can be done with `unordered_list2 = 4` tweaks = {}, -- When true, will reformat the current line every time you press `` (Enter).