akinsho / akinsho/bufferline.nvim

[Bug]: vim.F.if_nil is deprecated. Feature will be removed in Nvim 0.15

未关闭
#1,054 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Lua
星标
4.4k
派生
240
PR 合并指标
30 天内没有已合并 PR

描述

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

vim.F.if_nil is deprecated and will be removed in an upcoming version.

From what I understand, the change is as simple as replacing `vim.F.if_nil` by `vim.nonnil()`.

Here is the full error message:

```
- ⚠️ WARNING vim.F.if_nil is deprecated. Feature will be removed in Nvim 0.15
- ADVICE:
- use vim.nonnil instead.
- stack traceback:
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline/highlights.lua:66
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline/highlights.lua:79
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline.lua:200
/home/vandal/repos/nvim-local/opt/LazyVim/lua/lazyvim/plugins/ui.lua:52
/home/vandal/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:380
=[C]:-1
/home/vandal/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:135
/home/vandal/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:395
/home/vandal/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:362
/home/vandal/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:197
/home/vandal/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:85
=[C]:-1
/home/vandal/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:175
- stack traceback:
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline/highlights.lua:66
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline/highlights.lua:116
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline/ui.lua:238
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline/ui.lua:472
vim/_core/shared:286
/home/vandal/.local/share/nvim/lazy/bufferline.nvim/lua/bufferline.lua:56
=[C]:-1
/usr/share/nvim/runtime/lua/vim/health.lua:389
/usr/share/nvim/runtime/lua/vim/health.lua:465
```

### What did you expect to happen?

Expected behaviour: no deprecated notification.

### Config

The configuration is the one from LazyVim: https://www.lazyvim.org/plugins/ui#bufferlinenvim, but with `vim.g.deprecation_warnings = true` to see the warnings.

### Additional Information

_No response_

### commit

_No response_

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。