Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify usage of tweaks and indentation in core.esupports.indent #1588

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lua/neorg/modules/core/esupports/indent/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 `<CR>` (Enter).
Expand Down
Loading