[mirror] Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(config): use new vim.validate, and not old one (#114)

authored by

Smirnov Oleksandr and committed by
GitHub
de585144 9db5931a

+19 -21
+19 -21
lua/gopher/config.lua
··· 77 77 ---@param user_config? gopher.Config 78 78 ---@dochide 79 79 function config.setup(user_config) 80 - vim.validate { user_config = { user_config, "table", true } } 80 + vim.validate("user_config", user_config, "table", true) 81 81 82 82 _config = vim.tbl_deep_extend("force", vim.deepcopy(default_config), user_config or {}) 83 83 84 - vim.validate { 85 - log_level = { _config.log_level, "number" }, 86 - timeout = { _config.timeout, "number" }, 87 - installer_timeout = { _config.installer_timeout, "number" }, 88 - ["commands"] = { _config.commands, "table" }, 89 - ["commands.go"] = { _config.commands.go, "string" }, 90 - ["commands.gomodifytags"] = { _config.commands.gomodifytags, "string" }, 91 - ["commands.gotests"] = { _config.commands.gotests, "string" }, 92 - ["commands.impl"] = { _config.commands.impl, "string" }, 93 - ["commands.iferr"] = { _config.commands.iferr, "string" }, 94 - ["gotests"] = { _config.gotests, "table" }, 95 - ["gotests.template"] = { _config.gotests.template, "string" }, 96 - ["gotests.template_dir"] = { _config.gotests.template, "string", true }, 97 - ["gotests.named"] = { _config.gotests.named, "boolean" }, 98 - ["gotag"] = { _config.gotag, "table" }, 99 - ["gotag.transform"] = { _config.gotag.transform, "string" }, 100 - ["gotag.default_tag"] = { _config.gotag.default_tag, "string" }, 101 - ["iferr"] = { _config.iferr, "table" }, 102 - ["iferr.message"] = { _config.iferr.message, "string", true }, 103 - } 84 + vim.validate("log_level", _config.log_level, "number") 85 + vim.validate("timeout", _config.timeout, "number") 86 + vim.validate("installer_timeout", _config.timeout, "number") 87 + vim.validate("commands", _config.commands, "table") 88 + vim.validate("commands.go", _config.commands.go, "string") 89 + vim.validate("commands.gomodifytags", _config.commands.gomodifytags, "string") 90 + vim.validate("commands.gotests", _config.commands.gotests, "string") 91 + vim.validate("commands.impl", _config.commands.impl, "string") 92 + vim.validate("commands.iferr", _config.commands.iferr, "string") 93 + vim.validate("gotests", _config.gotests, "table") 94 + vim.validate("gotests.template", _config.gotests.template, "string") 95 + vim.validate("gotests.template_dir", _config.gotests.template_dir, "string", true) 96 + vim.validate("gotests.named", _config.gotests.named, "boolean") 97 + vim.validate("gotag", _config.gotag, "table") 98 + vim.validate("gotag.transform", _config.gotag.transform, "string") 99 + vim.validate("gotag.default_tag", _config.gotag.default_tag, "string") 100 + vim.validate("iferr", _config.iferr, "table") 101 + vim.validate("iferr.message", _config.iferr.message, "string", true) 104 102 end 105 103 106 104 setmetatable(config, {