From c2f7f8d61c6436e1de13d921f13760fbdfe1d624 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sat, 11 Mar 2023 17:23:50 +0700 Subject: [PATCH 1/4] refactor(highlight)!: remove deprecated functions vim.highlight.create/link --- runtime/lua/vim/highlight.lua | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/runtime/lua/vim/highlight.lua b/runtime/lua/vim/highlight.lua index 89eae0def5..d71a806ea8 100644 --- a/runtime/lua/vim/highlight.lua +++ b/runtime/lua/vim/highlight.lua @@ -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 From 71eebd28d1da487fbbb3c162c6b909940f76883d Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sat, 11 Mar 2023 17:24:48 +0700 Subject: [PATCH 2/4] refactor(treesitter)!: remove deprecated show_tree func --- runtime/lua/vim/treesitter.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua index 5723cce563..56000f99a8 100644 --- a/runtime/lua/vim/treesitter.lua +++ b/runtime/lua/vim/treesitter.lua @@ -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': ---
lua
 --- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'

From 36ca082a11e70e84c985a62db293732ea527ea01 Mon Sep 17 00:00:00 2001
From: nullchilly 
Date: Sat, 11 Mar 2023 17:27:16 +0700
Subject: [PATCH 3/4] refactor(health)!: remove deprecated health.lua

---
 runtime/lua/health.lua | 6 ------
 1 file changed, 6 deletions(-)
 delete mode 100644 runtime/lua/health.lua

diff --git a/runtime/lua/health.lua b/runtime/lua/health.lua
deleted file mode 100644
index 40e2b3c3e7..0000000000
--- a/runtime/lua/health.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-return setmetatable({}, {
-  __index = function(_, k)
-    vim.deprecate("require('health')", 'vim.health', '0.9', false)
-    return vim.health[k]
-  end,
-})

From 2ae54cef6e54ea97e2a18943389a9dba9ad365d2 Mon Sep 17 00:00:00 2001
From: nullchilly 
Date: Sat, 11 Mar 2023 17:57:07 +0700
Subject: [PATCH 4/4] docs: add removed features in news.txt

---
 runtime/doc/news.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 801b74df45..da9ebd589f 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -237,6 +237,10 @@ The following deprecated functions or APIs were removed.
 • |LanguageTree:parse()| no longer returns changed regions. Please use the
   `on_changedtree` callbacks instead.
 
+• `vim.highlight.create()`, `vim.highlight.link()` were removed, use |nvim_set_hl()| instead.
+
+• `require'health'` was removed. Use |vim.health| instead.
+
 ==============================================================================
 DEPRECATIONS                                                *news-deprecations*