mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
Merge pull request #22627 from nullchilly/highlight-cleanup
refactor!: remove deprecated functions
This commit is contained in:
@@ -10,30 +10,6 @@ M.priorities = {
|
||||
user = 200,
|
||||
}
|
||||
|
||||
---@private
|
||||
function M.create(higroup, hi_info, default)
|
||||
vim.deprecate('vim.highlight.create', 'vim.api.nvim_set_hl', '0.9')
|
||||
local options = {}
|
||||
-- TODO: Add validation
|
||||
for k, v in pairs(hi_info) do
|
||||
table.insert(options, string.format('%s=%s', k, v))
|
||||
end
|
||||
vim.cmd(
|
||||
string.format(
|
||||
[[highlight %s %s %s]],
|
||||
default and 'default' or '',
|
||||
higroup,
|
||||
table.concat(options, ' ')
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
---@private
|
||||
function M.link(higroup, link_to, force)
|
||||
vim.deprecate('vim.highlight.link', 'vim.api.nvim_set_hl', '0.9')
|
||||
vim.cmd(string.format([[highlight%s link %s %s]], force and '!' or ' default', higroup, link_to))
|
||||
end
|
||||
|
||||
--- Highlight range between two positions
|
||||
---
|
||||
---@param bufnr integer Buffer number to apply highlighting to
|
||||
|
||||
@@ -648,12 +648,6 @@ function M.inspect_tree(opts)
|
||||
})
|
||||
end
|
||||
|
||||
---@deprecated
|
||||
---@private
|
||||
function M.show_tree()
|
||||
vim.deprecate('show_tree', 'inspect_tree', '0.9', nil, false)
|
||||
end
|
||||
|
||||
--- Returns the fold level for {lnum} in the current buffer. Can be set directly to 'foldexpr':
|
||||
--- <pre>lua
|
||||
--- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
|
||||
Reference in New Issue
Block a user