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

Multiline arrays and features #77

Open
ten3roberts opened this issue Aug 11, 2023 · 3 comments
Open

Multiline arrays and features #77

ten3roberts opened this issue Aug 11, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ten3roberts
Copy link
Contributor

Current behavior

Features which are in a multi line array are not recognized.

The multiline arrays happen automatically after a certain number of features using lsp-format with taplo, or any other toml formatter or outputter.

Expected behavior

The features on multiline arrays are all parsed and when adding a feature it added to the end of the list rather than at the end of the line without a comma.

Additional context/Screenshots

image

image

Neovim version

nvim --version
NVIM v0.10.0-dev-2158+g3d948a4dc-Homebrew
Build type: Release
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info
@ten3roberts ten3roberts added the bug Something isn't working label Aug 11, 2023
@saecki
Copy link
Owner

saecki commented Aug 11, 2023

This is a limitation of the parser, which currently is just a bunch of regexes. As described in #56 I don't think it is feasible to build out the current model in order to support any kind of syntax, but rather a lenient toml parser is the proper solution.

I don't know when I'll have the time to make this change.

@ten3roberts
Copy link
Contributor Author

I see, feared that was the case.

Using a proper parser would definitely be preferred, as it would solve the ultimate source of this issue and a quite a few other existing and future ones. Perhaps there are ready made parsers in lua which we can integrate

@saecki
Copy link
Owner

saecki commented Dec 17, 2023

For anyone interested, I've been working on said parser lately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants