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

Better Dimming with Markdown Files? #16

Closed
FOSSilizedDaemon opened this issue Aug 23, 2021 · 5 comments
Closed

Better Dimming with Markdown Files? #16

FOSSilizedDaemon opened this issue Aug 23, 2021 · 5 comments
Labels

Comments

@FOSSilizedDaemon
Copy link

I am loving using Twilight, but I have noticed that in markdown files Twilight does not proper see the see the beginning or end of each block. For example here you can see it highlight two blocks instead of just one. Is there anything I can do to get it to only highlight one block?

@Hubro
Copy link

Hubro commented May 5, 2022

Have you tried tweaking the context config option?

@FOSSilizedDaemon
Copy link
Author

Have you tried tweaking the context config option?

The issue is sometimes I have more than X lines I need to highlight around the current line.

@TymekDev
Copy link

I have also experienced a bit awkward dimming in markdown. I have set context to 0 and you can see results below.

I found out that using tree-sitter playground setting I could provide sensible values to expand option in Twilight config. These three values fix make entire paragraph, code block, and list highlighted.

require("twilight").setup({
  context = 0,
  expand = {
    -- markdown
    "paragraph",
    "fenced_code_block",
    "list",
  }
})

I am a bit concerned about possible naming collision in tree-sitter nodes, but I have no clue if it is a valid concern. If it is, then perhaps expand could be extended to provide values per filetype?

Default config with context = 0

Section and paragraph

Code block

List

TymekDev added a commit to TymekDev/dotfiles that referenced this issue Aug 29, 2022
Copy link
Contributor

github-actions bot commented Jul 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jul 7, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants