nvim-neorocks / toml-edit.lua

Edit toml files while preserving whitespace and formatting from Lua.
MIT License
12 stars 2 forks source link

[Bug] comments in `rocks.toml` on inline configurations not handled properly #35

Open Quitlox opened 1 month ago

Quitlox commented 1 month ago

Hi there, thanks for the work on this project!

When you have a comment describing your inline plugin and call any rocks command that manipulates this configuration, the resulting rocks.toml is broken.

Steps to reproduce

[Before] rocks.toml

[rocks]
[plugins]
"rocks.nvim" = "2.36.1"
"rocks-git.nvim" = "2.0.1"

# Test
"markdown.nvim" = { git = "meanderingprogrammer/markdown.nvim" }

Act

  1. Rocks update

[After] rocks.toml

[rocks]
[plugins]
"rocks.nvim" = "2.36.1"
"rocks-git.nvim" = "2.0.1"

[
# Test
plugins."markdown.nvim" ]
git = "meanderingprogrammer/markdown.nvim"
rev = "v4.1.0^{}"
mrcjkb commented 1 month ago

Hey :wave:

Thanks for reporting. This is either a toml-edit.lua bug or a toml_edit (which toml-edit.lua is built on) bug.

@vhyrro can you please transfer this issue to toml-edit?

vhyrro commented 1 month ago

Yep, on it