Skip to content

feat(toml): highlight table headers - #7441

Merged
the-mikedavis merged 1 commit into
helix-editor:masterfrom
branchv:toml
Jun 24, 2023
Merged

feat(toml): highlight table headers#7441
the-mikedavis merged 1 commit into
helix-editor:masterfrom
branchv:toml

Conversation

@branchv

@branchv branchv commented Jun 24, 2023

Copy link
Copy Markdown
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"]]

@dead10ck dead10ck left a comment

Copy link
Copy Markdown
Member

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
@branchv
branchv 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
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 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

Successfully merging this pull request may close these issues.

3 participants