From f8ddcd7f493669a98e051e4e58de2db1e66fc0e4 Mon Sep 17 00:00:00 2001 From: Jordan Mandel Date: Mon, 1 Jun 2026 11:39:29 -0400 Subject: [PATCH] fix deprecated vim.validate table syntax for Nvim 1.0 compatibility Co-Authored-By: Claude Sonnet 4.6 --- lua/bionic-reading/config.lua | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lua/bionic-reading/config.lua b/lua/bionic-reading/config.lua index 13ec836..65f45eb 100644 --- a/lua/bionic-reading/config.lua +++ b/lua/bionic-reading/config.lua @@ -43,14 +43,12 @@ function Config._setup(opts) Config.opts.hl_group_value = hl_group_value end - vim.validate({ - auto_highlight = { Config.opts.auto_highlight, "boolean" }, - file_types = { Config.opts.file_types, { "table", "string" } }, - hl_group_value = { Config.opts.hl_group_value, "table" }, - prompt_user = { Config.opts.prompt_user, "boolean" }, - treesitter = { Config.opts.treesitter, "boolean" }, - update_in_insert_mode = { Config.opts.update_in_insert_mode, "boolean" }, - }) + vim.validate("auto_highlight", Config.opts.auto_highlight, "boolean") + vim.validate("file_types", Config.opts.file_types, { "table", "string" }) + vim.validate("hl_group_value", Config.opts.hl_group_value, "table") + vim.validate("prompt_user", Config.opts.prompt_user, "boolean") + vim.validate("treesitter", Config.opts.treesitter, "boolean") + vim.validate("update_in_insert_mode", Config.opts.update_in_insert_mode, "boolean") end --- Update bionic-reading.nvim configuration @@ -82,9 +80,7 @@ function Config._update(key, value) Config.opts[key] = value end - vim.validate({ - key = { Config.opts[key], type(Config.opts[key]) }, - }) + vim.validate("key", Config.opts[key], type(Config.opts[key])) return true end