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