nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3k stars 131 forks source link

Conceal headline asterisks #29

Closed ourigen closed 3 years ago

ourigen commented 3 years ago

Does this feature exist in Emacs orgmode? Yes

Link to the orgmode manual or any documentation related to the feature:

https://orgmode.org/org.html#Clean-View

Additional context

Would it be possible to define a custom highlight group for headline asterisks so that they can be concealed? For those of us that use a lot of headlines, changing all but the last asterisk to the background color would help the document look cleaner. Example:

* Top level headline             |    * Top level headline
** Second level                  |      * Second level
*** Third level                  |        * Third level
some text                        |          some text
*** Third level                  |        * Third level
more text                        |          more text
* Another top level headline     |    * Another top level headline
kristijanhusak commented 3 years ago

This was added. Check https://github.com/kristijanhusak/orgmode.nvim/blob/master/DOCS.md#org_hide_leading_stars.

Note that stars are not concealed because conceal feature can only conceal to single character, which does not work for this case.

Instead, specific hl group is applied that hides the leading stars. Let me know how it works.

ourigen commented 3 years ago

Brief check shows that it's working great! Thanks for the quick work on this