From 63cfd55eb2573bd37886866de98ae8b8c4e8604c Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Thu, 15 Jun 2023 21:46:36 -0700 Subject: [PATCH] refactor!: drop support for Neovim 0.7 --- README.md | 2 +- lua/dressing/init.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e8849f..7d05c3a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ options in the functions. Customization will be done entirely using a separate ## Requirements -Neovim 0.7.0+ (for earlier versions, use the [nvim-0.5 branch](https://github.com/stevearc/dressing.nvim/tree/nvim-0.5)) +Neovim 0.8.0+ (for earlier versions, use the [nvim-0.7](https://github.com/stevearc/dressing.nvim/tree/nvim-0.7) or [nvim-0.5](https://github.com/stevearc/dressing.nvim/tree/nvim-0.5) branch) ## Screenshots diff --git a/lua/dressing/init.lua b/lua/dressing/init.lua index 3b76399..3f576c0 100644 --- a/lua/dressing/init.lua +++ b/lua/dressing/init.lua @@ -4,11 +4,18 @@ local M = {} M.setup = function(opts) require("dressing.config").update(opts) - patch.all() + M.patch() end ---Patch all the vim.ui methods M.patch = function() + if vim.fn.has("nvim-0.8") == 0 then + vim.notify_once( + "dressing has dropped support for Neovim <0.8. Please use the nvim-0.7 branch or upgrade Neovim", + vim.log.levels.ERROR + ) + return + end patch.all() end