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

Formatter splits nested array across multiple lines unnecessarily #724

Open
UtkarshVerma opened this issue Dec 24, 2024 · 4 comments
Open

Comments

@UtkarshVerma
Copy link

I have the following toml.

# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"

[manager]
prepend_keymap = [
	# Disable defaults
	{ on = [ "g", "h" ], run = "noop" },
]

taplo keeps formatting this as the following:

# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"

[manager]
prepend_keymap = [
	# Disable defaults
	{ on = [
		"g",
		"h",
	], run = "noop" },
]

I really like how concise the previous layout is. Is there any way to tell it not do anything here?

@panekj
Copy link
Collaborator

panekj commented Dec 24, 2024

Set inline_table_expand to false

@UtkarshVerma
Copy link
Author

How do I configure that in my LSP? I could not find the settings schema for taplo.

@panekj
Copy link
Collaborator

panekj commented Dec 24, 2024

How are you using it? VSCode? Other editor?

@UtkarshVerma
Copy link
Author

I'm using it with Neovim.

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