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

@@ -806,7 +806,7 @@ based on the filetype.
>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,
}
@@ -1007,7 +1007,7 @@ DIFFERENT ICONS BASED ON FILETYPE ~
>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,
}
@@ -1048,7 +1048,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