Skip to content

Commit 4223d87

Browse files
authored
Merge branch 'master' into master
2 parents bb62f09 + cf261f7 commit 4223d87

File tree

7 files changed

+207
-70
lines changed

7 files changed

+207
-70
lines changed

DOCS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
9. [User interface](#user-interface)
2424
1. [Colors](#colors)
2525
2. [Menu](#menu)
26+
3. [Folds](#folds)
2627
10. [Advanced search](#advanced-search)
2728
11. [Notifications (experimental)](#notifications-experimental)
2829
12. [Clocking](#clocking)
@@ -1859,6 +1860,21 @@ Each menu item `MenuItem` is one of two types: `MenuOption` and `MenuSeparator`.
18591860

18601861
In order for the menu to work as expected, the handler must call `action` from `MenuItem`.
18611862

1863+
### Folds
1864+
In Neovim 0.10+, folds are colored with the same highlight as when they are expanded.
1865+
This is enabled by default to be in line with how Emacs work.
1866+
1867+
To use the old way of highlighting folds with `Folded` highlight group, add this to config:
1868+
```lua
1869+
require('orgmode').setup({
1870+
ui = {
1871+
folds = {
1872+
colored = false
1873+
}
1874+
}
1875+
})
1876+
```
1877+
18621878
## Advanced search
18631879

18641880
Part of [Advanced search](https://orgmode.org/worg/org-tutorials/advanced-searching.html) functionality

doc/orgmode.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ CONTENTS *orgmode-content
182182
1.9.1. Colors.............................................|orgmode-colors|
183183
1.9.1.1. Overriding colors.................|orgmode-overriding_colors|
184184
1.9.2. Menu.................................................|orgmode-menu|
185+
1.9.3. Folds...............................................|orgmode-folds|
185186
1.10. Advanced search................................|orgmode-advanced_search|
186187
1.11. Notifications (experimental)......|orgmode-notifications_(experimental)|
187188
1.11.1. Cron................................................|orgmode-cron|
@@ -228,6 +229,7 @@ TABLE OF CONTENT *orgmode-table_of_conten
228229
9. User interface (#user-interface)
229230
1. Colors (#colors)
230231
2. Menu (#menu)
232+
3. Folds (#folds)
231233
10. Advanced search (#advanced-search)
232234
11. Notifications (experimental) (#notifications-experimental)
233235
12. Clocking (#clocking)
@@ -2023,6 +2025,22 @@ Each menu item `MenuItem` is one of two types: `MenuOption` and `MenuSeparator`.
20232025

20242026
In order for the menu to work as expected, the handler must call `action` from `MenuItem`.
20252027

2028+
FOLDS *orgmode-folds*
2029+
2030+
In Neovim 0.10+, folds are colored with the same highlight as when they are expanded.
2031+
This is enabled by default to be in line with how Emacs work.
2032+
2033+
To use the old way of highlighting folds with `Folded` highlight group, add this to config:
2034+
>
2035+
require('orgmode').setup({
2036+
ui = {
2037+
folds = {
2038+
colored = false
2039+
}
2040+
}
2041+
})
2042+
<
2043+
20262044
--------------------------------------------------------------------------------
20272045
ADVANCED SEARCH *orgmode-advanced_search*
20282046

ftplugin/org.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ vim.bo.modeline = false
2424
vim.opt_local.fillchars:append('fold: ')
2525
vim.opt_local.foldmethod = 'expr'
2626
vim.opt_local.foldexpr = 'v:lua.require("orgmode.org.fold").foldexpr()'
27-
if utils.has_version_10() then
27+
if utils.has_version_10() and config.ui.folds.colored then
2828
vim.opt_local.foldtext = ''
2929
else
3030
vim.opt_local.foldtext = 'v:lua.require("orgmode.org.indent").foldtext()'

lua/orgmode/config/defaults.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ local DefaultConfig = {
200200
config_path = '$HOME/.emacs.d/init.el',
201201
},
202202
ui = {
203+
folds = {
204+
colored = true,
205+
},
203206
menu = {
204207
handler = nil,
205208
},

0 commit comments

Comments
 (0)