echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
5.01k stars 185 forks source link

refactor(completion): remove deprecated `vim.lsp.util.trim_empty_lines` #903

Closed ripjackie closed 4 months ago

ripjackie commented 4 months ago

vim.lsp.util.trim_empty_lines is considered deprecated with the release of nvim v0.10.0. Instances of this function have been replaced with vim.split(...) with trimempty = true following the neovim repo.

Module(s)

Completion

Description

With the release of Neovim v0.10.0, vim.lsp.util.trim_empty_lines was deprecated in favor of using vim.split with the trimempty flag set. I was getting deprecated popups while using mini.completion, so I put in this quick refactor.

echasnovski commented 4 months ago

Thanks for the PR!

I'd prefer custom helper function, as this usage of vim.split() is not supported on earlier (still supported) version of Neovim.

I'll hope to resolve this tomorrow.

ripjackie commented 4 months ago

I've added a new commit that pulls the refactor into a helper function, and I believe I have it in the correct section for when compat for nvim < 0.10 is dropped.

echasnovski commented 4 months ago

This should now be resolved on latest main.