Skip to content

Commit d3ea757

Browse files
author
github-actions
committed
[docgen] Update docs
1 parent eb45186 commit d3ea757

File tree

1 file changed

+74
-46
lines changed

1 file changed

+74
-46
lines changed

doc/orgmode.txt

+74-46
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ CONTENTS *orgmode-content
169169
1.8. Formatting...........................................|orgmode-formatting|
170170
1.9. User interface...................................|orgmode-user_interface|
171171
1.9.1. Colors.............................................|orgmode-colors|
172-
1.9.1.1. Highlight Groups...................|orgmode-highlight_groups|
172+
1.9.1.1. Overriding colors.................|orgmode-overriding_colors|
173173
1.9.2. Menu.................................................|orgmode-menu|
174174
1.10. Advanced search................................|orgmode-advanced_search|
175175
1.11. Notifications (experimental)......|orgmode-notifications_(experimental)|
@@ -425,7 +425,7 @@ Enabled:
425425
NOTE: Stars are hidden by applying highlight group that masks them with color that's same as background color.
426426
If this highlight group does not suit you, you can apply different highlight group to it:
427427
>
428-
vim.cmd[[autocmd ColorScheme * hi link OrgHideLeadingStars MyCustomHlGroup]]
428+
vim.cmd[[autocmd ColorScheme * hi link @org.leading.stars MyCustomHlGroup]]
429429
<
430430

431431
ORG_HIDE_EMPHASIS_MARKERS *orgmode-org_hide_emphasis_markers*
@@ -1729,61 +1729,89 @@ USER INTERFACE *orgmode-user_interfac
17291729

17301730
COLORS *orgmode-colors*
17311731

1732+
Most of the highlight groups are linked to treesitter highlights where applicable (see `:h treesitter-highlight`).
1733+
1734+
The following highlight groups are used:
1735+
1736+
* `@org.headline.level.1`: Headline at level 1 - `linked to Title`
1737+
* `@org.headline.level.2`: Headline at level 2 - `linked to Constant`
1738+
* `@org.headline.level.3`: Headline at level 3 - `linked to Identifier`
1739+
* `@org.headline.level.4`: Headline at level 4 - `linked to Statement`
1740+
* `@org.headline.level.5`: Headline at level 5 - `linked to PreProc`
1741+
* `@org.headline.level.6`: Headline at level 6 - `linked to Type`
1742+
* `@org.headline.level.7`: Headline at level 7 - `linked to Special`
1743+
* `@org.headline.level.8`: Headline at level 8 - `linked to String`
1744+
* `@org.timestamp.active`: An active timestamp - linked to `@keyword`
1745+
* `@org.timestamp.inactive`: An inactive timestamp - linked to `@comment`
1746+
* `@org.keyword.todo`: TODO keywords color - Parsed from `Error` (see note below)
1747+
* `@org.keyword.done`: DONE keywords color - Parsed from `DiffAdd` (see note below)
1748+
* `@org.bullet`: A normal bullet under a header item - linked to `@markup.list`
1749+
* `@org.properties`: Property drawer start/end delimiters - linked to `@property`
1750+
* `@org.drawer`: Drawer start/end delimiters - linked to `@property`
1751+
* `@org.tag`: A tag for a headline item, shown on the righthand side like `:foo:` - linked to `@tag.attribute`
1752+
* `@org.plan`: `SCHEDULED`, `DEADLINE`, `CLOSED`, etc. keywords - linked to `Constant`
1753+
* `@org.comment`: A comment block - linked to `@comment`
1754+
* `@org.latex_env`: LaTeX block - linked to `@markup.environment`
1755+
* `@org.directive`: Blocks starting with `#+` - linked to `@comment`
1756+
* `@org.checkbox`: The default checkbox highlight, including square brackets - linked to `@markup.list.unchecked`
1757+
* `@org.checkbox.halfchecked`: A checkbox status (marker between `[]`) checked with `[-]` - linked to `@markup.list.unchecked`
1758+
* `@org.checkbox.checked`: A checkbox status (marker between `[]`) checked with either `[x]` or `[X]` - linked to `@markup.list.checked`
1759+
* `@org.bold`: bold text - linked to `@markup.strong`,
1760+
* `@org.bold.delimiter`: bold text delimiter `*` - linked to `@markup.strong`,
1761+
* `@org.italic`: italic text - linked to `@markup.italic`,
1762+
* `@org.italic.delimiter`: italic text delimiter `/` - linked to `@markup.italic`,
1763+
* `@org.strikethrough`: ~strikethrough~ text - linked to `@markup.strikethrough`,
1764+
* `@org.strikethrough.delimiter`: strikethrough text delimiter `+` - linked to `@markup.strikethrough`,
1765+
* `@org.underline`: underline text - linked to `@markup.underline`,
1766+
* `@org.underline.delimiter`: underline text delimiter `_` - linked to `@markup.underline`,
1767+
* `@org.code`: `code` text - linked to `@markup.raw`,
1768+
* `@org.code.delimiter`: code text delimiter `~` - linked to `@markup.raw`,
1769+
* `@org.verbatim`: `verbatim` text - linked to `@markup.raw`,
1770+
* `@org.verbatim.delimiter`: verbatim text delimiter `=` - linked to `@markup.raw`,
1771+
* `@org.hyperlink`: link (link) text - linked to `@markup.link.url`,
1772+
* `@org.latex`: Inline latex - linked to `@markup.math`,
1773+
* `@org.table.delimiter` - `|` and `-` delimiters in tables - linked to `@punctuation.special`,
1774+
* `@org.table.heading` - Table headings - linked to `@markup.heading`,
1775+
* `@org.edit_src` - The highlight for the source content in an Org buffer while it is being edited in an edit special buffer - linked to `Visual`,
1776+
* `@org.agenda.deadline`: A item deadline in the agenda view - Parsed from `Error` (see note below)
1777+
* `@org.agenda.scheduled`: A scheduled item in the agenda view - Parsed from `DiffAdd` (see note dbelow)
1778+
* `@org.agenda.scheduled_past`: A item past its scheduled date in the agenda view - Parsed from `WarningMsg` (see note below)
1779+
1780+
Note:
1781+
17321782
Colors used for todo keywords and agenda states (deadline, schedule ok, schedule warning)
1733-
are parsed from the current colorsheme from several highlight groups (Error, WarningMsg, DiffAdd, etc.).
1734-
If those colors are not suitable you can override them like this:
1783+
are parsed from the current colorscheme from several highlight groups (Error, WarningMsg, DiffAdd, etc.).
1784+
1785+
OVERRIDING COLORS *orgmode-overriding_colors*
1786+
1787+
All colors can be overridden by either setting new values or linking to another highlight group:
17351788
>
1736-
autocmd ColorScheme * call s:setup_org_colors()
1737-
function! s:setup_org_colors() abort
1738-
hi OrgAgendaDeadline guifg=#FFAAAA
1739-
hi OrgAgendaScheduled guifg=#AAFFAA
1740-
hi OrgAgendaScheduledPast guifg=Orange
1741-
endfunction
1789+
vim.api.nvim_create_autocmd('ColorScheme', {
1790+
pattern = '*',
1791+
callback = function()
1792+
-- Define own colors
1793+
vim.api.nvim_set_hl(0, '@org.agenda.deadline', { fg = '#FFAAAA' })
1794+
vim.api.nvim_set_hl(0, '@org.agenda.scheduled', { fg = '#AAFFAA' })
1795+
-- Link to another highlight group
1796+
vim.api.nvim_set_hl(0, '@org.agenda.scheduled_past', { link = 'Statement' })
1797+
end
1798+
})
17421799
<
17431800

1744-
or you can link it to another highlight group:
1801+
Or in Vimscript:
17451802
>
1803+
autocmd ColorScheme * call s:setup_org_colors()
17461804
function! s:setup_org_colors() abort
1747-
hi link OrgAgendaDeadline Error
1748-
hi link OrgAgendaScheduled DiffAdd
1749-
hi link OrgAgendaScheduledPast Statement
1805+
" Define own colors
1806+
hi @org.agenda.deadline guifg=#FFAAAA
1807+
hi @org.agenda.scheduled guifg=#AAFFAA
1808+
" Link to another highlight group
1809+
hi link @org.agenda.scheduled_past Statement
17501810
endfunction
17511811
<
17521812

17531813
For adding/changing TODO keyword colors see org-todo-keyword-faces (#org_todo_keyword_faces)
17541814

1755-
HIGHLIGHT GROUPS *orgmode-highlight_groups*
1756-
1757-
* The following highlight groups are based on Treesitter query results, hence when setting up Orgmode these
1758-
highlights must be enabled by removing `disable = {'org'}` from the default recommended Treesitter configuration.
1759-
* `OrgTSTimestampActive`: An active timestamp
1760-
* `OrgTSTimestampInactive`: An inactive timestamp
1761-
* `OrgTSBullet`: A normal bullet under a header item
1762-
* `OrgTSPropertyDrawer`: Property drawer start/end delimiters
1763-
* `OrgTSDrawer`: Drawer start/end delimiters
1764-
* `OrgTSTag`: A tag for a headline item, shown on the righthand side like `:foo:`
1765-
* `OrgTSPlan`: `SCHEDULED`, `DEADLINE`, `CLOSED`, etc. keywords
1766-
* `OrgTSComment`: A comment block
1767-
* `OrgTSLatex`: LaTeX block
1768-
* `OrgTSDirective`: Blocks starting with `#+`
1769-
* `OrgTSCheckbox`: The default checkbox highlight, overridden if any of the below groups are specified
1770-
* `OrgTSCheckboxChecked`: A checkbox checked with either `[x]` or `[X]`
1771-
* `OrgTSCheckboxHalfChecked`: A checkbox checked with `[-]`
1772-
* `OrgTSCheckboxUnchecked`: A empty checkbox
1773-
* `OrgTSHeadlineLevel1`: Headline at level 1
1774-
* `OrgTSHeadlineLevel2`: Headline at level 2
1775-
* `OrgTSHeadlineLevel3`: Headline at level 3
1776-
* `OrgTSHeadlineLevel4`: Headline at level 4
1777-
* `OrgTSHeadlineLevel5`: Headline at level 5
1778-
* `OrgTSHeadlineLevel6`: Headline at level 6
1779-
* `OrgTSHeadlineLevel7`: Headline at level 7
1780-
* `OrgTSHeadlineLevel8`: Headline at level 8
1781-
* The following use vanilla Vim syntax matching, and will work without Treesitter highlighting enabled.
1782-
* `OrgEditSrcHighlight`: The highlight for the source content in an Org buffer while it is being edited in an edit special buffer
1783-
* `OrgAgendaDeadline`: A item deadline in the agenda view
1784-
* `OrgAgendaScheduled`: A scheduled item in the agenda view
1785-
* `OrgAgendaScheduledPast`: A item past its scheduled date in the agenda view
1786-
17871815
MENU *orgmode-menu*
17881816

17891817
The menu is used when selecting further actions in `agenda`, `capture` and `export`. Here is an example of the menu you see when opening `agenda`:

0 commit comments

Comments
 (0)