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

toml: don't highlight keys with inline tables as tables #2002

Merged
merged 1 commit into from Dec 3, 2023

Conversation

arp242
Copy link
Contributor

@arp242 arp242 commented Oct 12, 2023

A TOML table looks like:

[tblname]
key = 'value'

You can also use inline tables like so:

[tblname]
key = 'value'
inline = {key = 'value'}

However, the "inline" would get highlighted as a table (same as "[tblname]") rather than a regular key, which is very jarring and unexpected IMHO.

It looks like it's been like this ever since inline tables were added in #1359, but I don't think anyone really wants this behaviour.

A TOML table looks like:

	[tblname]
	key = 'value'

You can also use inline tables like so:

	[tblname]
	key = 'value'
	inline = {key = 'value'}

However, the "inline" would get highlighted as a table (same as
"[tblname]") rather than a regular key, which is very jarring and
unexpected IMHO.

It looks like it's been like this ever since inline tables were added in
#1359, but I don't think anyone really wants this behaviour.
@arp242
Copy link
Contributor Author

arp242 commented Oct 12, 2023

Example of the current behaviour (before this change):

cap-2023-10-12T08:51:53_border

That temp_targets highlighted the same as tables looks really off.

@tancnle
Copy link
Collaborator

tancnle commented Dec 3, 2023

Thank you for your contribution @arp242. LGTM 🚀

@tancnle tancnle added this pull request to the merge queue Dec 3, 2023
Merged via the queue into rouge-ruby:master with commit 1bdd948 Dec 3, 2023
7 checks passed
@arp242 arp242 deleted the toml-it branch December 3, 2023 23:41
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

2 participants