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

Remove use of deprecated vim.tbl_flatten #426

Closed
wants to merge 1 commit into from
Closed

Conversation

reentim
Copy link
Contributor

@reentim reentim commented Sep 30, 2024

I'm attempting to move across to Neovim (using v0.11), and in trying to get a clean bill of of checkhealth :

WARNING vim.tbl_flatten is deprecated. Feature will be removed in Nvim 0.13
- ADVICE:                                                                  
  - use vim.iter(…):flatten():totable() instead.                           

Not sure if there's something I'm overlooking, though?

@wincent
Copy link
Owner

wincent commented Sep 30, 2024

Thanks @reentim!

Not sure if there's something I'm overlooking, though?

Looks good to me. The default flatten() method will unnest by 1 level, which is what we want here (we have a list of lists of errors, and we want to turn it into a list of errors).

Tested that it works by passing some invalid configs and seeing the error messages come through correctly. Also, by adding some print(vim.inspect(...)) debug staements to see that the flattening was happening as expected. Will merge.

@wincent wincent closed this in 75b8ad8 Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants