From b0b4a84aba3d7229395eea4096bfeec1a37c9ebf Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 6 Mar 2026 23:16:09 +0100 Subject: [PATCH] doc: sections & hl inheritance --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index dea15f2..dab1fe5 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,23 @@ example: only show diagnostics if `vim.diagnostic` is loaded: } ``` +### sections + +modules can handle different highlights for a section. ~ highlights inside will inherit the background color. + +```lua +{ + lylla.component(function() + return { + { section = "CursorLine" }, -- highlights after this will inherit the CursorLine bg + { "meow", "Title" }, + { " :3", "Constant" }, + { section = false }, -- denotes the end of a section + } + end) +} +``` + ### lsp information lylla components has a builtin helper for getting the current lsp client. -- 2.51.2