You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving the file Neovim should format both the yaml and the embedded json. But nothing what I tried would make conform.nvim format the json part. While troubleshooting (and fixing some of my own config bugs) I realized I had the misfortune of testing with a yaml file where the injection region was at at the end of the file. When adding another yaml key at the end of the file the json started formatting.
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
nvim -u repro.lua /path/to/test.yaml
Save the file.
Expected Behavior
Neovim will format both the yaml and the json file under "data/config.yaml".
I spent some debugging this again and made the following observation. When adding an extra yaml key at the end of the file and the json is formatted, the conform trace log will report:
Neovim version (nvim -v)
NVIM v0.10.0 Build type: RelWithDebInfo LuaJIT 2.1.1713773202
Operating system/version
Fedora 40
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
log_level was set to 'TRACE' to show injected formatter regions:
Describe the bug
When saving the file Neovim should format both the yaml and the embedded json. But nothing what I tried would make conform.nvim format the json part. While troubleshooting (and fixing some of my own config bugs) I realized I had the misfortune of testing with a yaml file where the injection region was at at the end of the file. When adding another yaml key at the end of the file the json started formatting.
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
Expected Behavior
Neovim will format both the yaml and the json file under "data/config.yaml".
Minimal example file
Minimal init.lua
Additional context
Treesitter file to inject json:
(put it in .repro/config/nvim/queries/yaml/injections.scm)
The text was updated successfully, but these errors were encountered: