How does highlighting work? #345
-
|
How do highlighting groups are set? The pending item highlight properties are somehow set to yellow and italic: The TSplaygroud shows the next my concealer module settings are: pending = {
enabled = true,
icon = "",
highlight = "NeorgTodoItemPendingMark",
query = "(todo_item_pending) @icon",
extract = function() return 1 end,
}, But I cannot find any mentions about The second question is: what extract = function() return 1 end, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hey! Before I answer the question about the highlight groups I do want to let you know that you only need to change the settings that you care about in the pending = {
icon = "",
}, And not have to worry about all the magic like About the highlights though - Neorg uses These can be changed in two ways. The first is to simply go somewhere in your config and vim.cmd([[
hi link NeorgTodoItem1Pending MyPreferredHighlightGroup
]])Neorg will recognize that you've set the highlight group manually and won't touch it. You can also customize ["core.integrations.treesitter"] = {
config = {
highlights = {
-- all highlights go here
}
}
}To view the entire table of highlight groups, consult the wiki entry. It's currently not indented properly because of some limitations but that'll show you how highlight groups can be changed through the config table. I hope that answers your question, but when in doubt do ask again! I'll try and help out whenever I can :) |
Beta Was this translation helpful? Give feedback.


Hey! Before I answer the question about the highlight groups I do want to let you know that you only need to change the settings that you care about in the
pendingtable - everything else will just be kept as the default. This means that you can refactor your code to:And not have to worry about all the magic like
extract. That function basically tells Neorg how many characters it should offset by, in this case one, otherwise you would get:<icon>-]instead of[<icon>].About the highlights though - Neorg uses
core.integrations.treesitterto bind Neorg highlight groups t…