fix: replace deprecated API in doc

This commit is contained in:
27Onion Nebell
2025-04-12 12:31:56 +08:00
parent 1460136dd0
commit b86844d3d3
4 changed files with 8 additions and 8 deletions

View File

@@ -918,7 +918,7 @@ symbols = {
```lua
symbols = {
icon_fetcher = function(kind, bufnr, symbol)
local ft = vim.api.nvim_buf_get_option(bufnr, 'ft')
local ft = vim.api.nvim_get_option_value('ft', { buf = bufnr })
-- ...
end,
}
@@ -1112,7 +1112,7 @@ and `icons` as fallback.
```lua
symbols = {
icon_fetcher = function(kind, bufnr)
local ft = vim.api.nvim_buf_get_option(bufnr, 'ft')
local ft = vim.api.nvim_get_option_value('ft', { buf = bufnr })
-- ...
end,
}
@@ -1152,7 +1152,7 @@ other filetypes.
```lua
symbols = {
icon_fetcher = function(k, buf)
local ft = vim.api.nvim_buf_get_option(buf, "ft")
local ft = vim.api.nvim_get_option_value("ft", { buf = buf })
if ft == 'markdown' then
return ""
end