Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change highlighting of folded lines? #755

Closed
gerazov opened this issue Jun 11, 2024 · 6 comments
Closed

How to change highlighting of folded lines? #755

gerazov opened this issue Jun 11, 2024 · 6 comments

Comments

@gerazov
Copy link
Contributor

gerazov commented Jun 11, 2024

I would like to gray out folded lines in my Org files.

I've moved to the treesitter based highlighting and figured out that I can override highlights using:

          ["@org.headline.level1"] = { fg = colors.blue },
          ["@org.headline.level2"] = { fg = colors.teal },
          ["@org.headline.level3"] = { fg = colors.mauve },
          ["@org.headline.level4"] = { fg = colors.sapphire },
          ["@org.headline.level5"] = { fg = colors.pink },

However I can't seem to setup the folded line highlighting. What are the highlight groups used for the folded lines?

@kristijanhusak
Copy link
Member

What Neovim version are you using? Only versions >= 0.10 support highlighting folded lines.

@gerazov
Copy link
Contributor Author

gerazov commented Jun 12, 2024

I updated to 0.10.

If I do:

    hi! folded gui=italic guifg=#E78284 guibg=#E78284

it does get the folded lines italic but the coloring is as if they're unfolded (i.e. TODO highlighted and headline highlighted as normal)

@kristijanhusak
Copy link
Member

it does get the folded lines italic but the coloring is as if they're unfolded (i.e. TODO highlighted and headline highlighted as normal)

And you would like to have it old way?

@gerazov
Copy link
Contributor Author

gerazov commented Jun 12, 2024

Currently it's colored:

image

I'd like to gray out the folded lines like so:
image

@kristijanhusak
Copy link
Member

Ah, ok. Nvim 0.10 added support for colored folds, so I added it as a default, since it's the same in Emacs.

I just pushed an option for this, so get the latest master.
You can add it to your orgmode setup to make it the old way:

require('orgmode').setup({
  ui = {
    folds = {
      colored = false
    }
  }
})

Docs: https://github.com/nvim-orgmode/orgmode/blob/master/DOCS.md#folds

@gerazov
Copy link
Contributor Author

gerazov commented Jun 12, 2024

Perfect! Hvala puno 🙏

@gerazov gerazov closed this as completed Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants