Wrong formatting with nested lists
Prerequisites
- [X] I am using the latest stable release of Neovim
- [X] I am using the latest version of the plugin
Neovim Version
NVIM v0.11.0-dev+18-g63e3a63d2
Neorg setup
require("neorg").setup({
load = {
["core.defaults"] = {},
["core.concealer"] = {},
},
})
Actual behavior
Nested lists are formatted to be a single line
Expected behavior
They should be properly wrapped and formatted
Steps to reproduce
Write the following:
- foo
-- bar
Execute gqip
The paragraph will be formatted like this:
- foo -- bar
Potentially conflicting plugins
No response
Other information
No response
Help
No
Implementation help
No response
I don't think that neorg sets the format expression anywhere, and there is no norg lsp at the moment (so lsp format expression also wouldn't take effect). So it just falls back to default formatting which is controlled by text width.
Couple paths forward:
- Just wait for LSP/external formatter to be built
- implement a custom format expression (I'm already doing this in neorg-conceal-wrap, I could add this logic to that plugin)
- you can use a custom text object for a list item, and use that instead of
ip. This is less than ideal though if you want to format an entire group of bullets
I could add this logic to that plugin
I did do this btw, but that plugin also formats based on concealed width obviously. benlubas/neorg-conceal-wrap