Skip to content

Commit

Permalink
chore: replace deprecated neovim API
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis committed Jan 26, 2025
1 parent 5effc6f commit 3dd2a20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/nvim-web-devicons/hi-test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ return function(
render_icons(bufnr, l, icons_by_window_manager, "By Window Manager")

-- finalise and focus the buffer
vim.api.nvim_buf_set_option(bufnr, "modifiable", false)
if vim.fn.has("nvim-0.10") == 1 then
vim.api.nvim_set_option_value("modifiable", false, { buf = bufnr })
else
vim.api.nvim_buf_set_option(bufnr, "modifiable", false) ---@diagnostic disable-line: deprecated
end
vim.cmd.buffer(bufnr)
end

0 comments on commit 3dd2a20

Please sign in to comment.