akinsho / akinsho/bufferline.nvim

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

Abierto
#1,054 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Lua
Estrellas
4.4k
Forks
240
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.