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

feat(toml): highlight table headers #7441

Merged
merged 1 commit into from Jun 24, 2023

Conversation

branchvincent
Copy link
Contributor

This highlights toml [table] headers differently, which matches GitHub (via linguist) and nvim-treesitter (although this implementation overlooks some combinations of quoted and dotted keys).

Before After
Before After

And for reference:

GitHub markdown

title = "TOML Example"

[table]
name = "Tom Preston-Werner"

["table"."dotted"]
enabled = true
ports = [8000, 8001, 8002]
dotted.key = { cpu = 79.5, case = 72.0 }
"quoted.key" = [["delta", "phi"], [3.14]]

[[table.dotted.array]]
ip = "10.0.0.1"
role = "frontend"

[bare]
[dot.ted]
["quoted"]

[[bare]]
[[dot.ted]]
[["quoted"]]

Copy link
Member

@dead10ck dead10ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me, thank you!

@the-mikedavis the-mikedavis merged commit 6c6923c into helix-editor:master Jun 24, 2023
6 checks passed
@branchvincent branchvincent deleted the toml branch June 24, 2023 18:11
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants