taplo
taplo copied to clipboard
Formatter splits nested array across multiple lines unnecessarily
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?
Set inline_table_expand to false
How do I configure that in my LSP? I could not find the settings schema for taplo.
How are you using it? VSCode? Other editor?
I'm using it with Neovim.
I'm using it with Neovim.
create a .taplo.toml or taplo.toml file in the root directory then put this
[formatting]
inline_table_expand = false
more information can be found here