refactor(#2787): use inline deprecation disabling
This commit is contained in:
@@ -177,8 +177,7 @@ local function open()
|
||||
if vim.fn.has "nvim-0.10" == 1 then
|
||||
vim.api.nvim_set_option_value("modifiable", false, { buf = M.bufnr })
|
||||
else
|
||||
---@diagnostic disable-next-line: deprecated
|
||||
vim.api.nvim_buf_set_option(M.bufnr, "modifiable", false)
|
||||
vim.api.nvim_buf_set_option(M.bufnr, "modifiable", false) ---@diagnostic disable-line: deprecated
|
||||
end
|
||||
|
||||
-- highlight it
|
||||
|
||||
@@ -85,8 +85,7 @@ function M.get_last_group_node(node)
|
||||
node = node.group_next
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: return-type-mismatch -- it can't be nil
|
||||
return node
|
||||
return node ---@diagnostic disable-line: return-type-mismatch -- it can't be nil
|
||||
end
|
||||
|
||||
---Group empty folders
|
||||
|
||||
@@ -154,8 +154,7 @@ local function create_overlay()
|
||||
if vim.fn.has "nvim-0.10" == 1 then
|
||||
vim.api.nvim_set_option_value("modifiable", true, { buf = overlay_bufnr })
|
||||
else
|
||||
---@diagnostic disable-next-line: deprecated
|
||||
vim.api.nvim_buf_set_option(overlay_bufnr, "modifiable", true)
|
||||
vim.api.nvim_buf_set_option(overlay_bufnr, "modifiable", true) ---@diagnostic disable-line: deprecated
|
||||
end
|
||||
|
||||
vim.api.nvim_buf_set_lines(overlay_bufnr, 0, -1, false, { M.filter })
|
||||
|
||||
@@ -22,8 +22,7 @@ local function _draw(bufnr, lines, hl_args, signs)
|
||||
if vim.fn.has "nvim-0.10" == 1 then
|
||||
vim.api.nvim_set_option_value("modifiable", true, { buf = bufnr })
|
||||
else
|
||||
---@diagnostic disable-next-line: deprecated
|
||||
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
|
||||
vim.api.nvim_buf_set_option(bufnr, "modifiable", true) ---@diagnostic disable-line: deprecated
|
||||
end
|
||||
|
||||
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines)
|
||||
@@ -32,8 +31,7 @@ local function _draw(bufnr, lines, hl_args, signs)
|
||||
if vim.fn.has "nvim-0.10" == 1 then
|
||||
vim.api.nvim_set_option_value("modifiable", false, { buf = bufnr })
|
||||
else
|
||||
---@diagnostic disable-next-line: deprecated
|
||||
vim.api.nvim_buf_set_option(bufnr, "modifiable", false)
|
||||
vim.api.nvim_buf_set_option(bufnr, "modifiable", false) ---@diagnostic disable-line: deprecated
|
||||
end
|
||||
|
||||
vim.fn.sign_unplace(SIGN_GROUP)
|
||||
|
||||
Reference in New Issue
Block a user