From d06f91d56c889fcd1cdfc2b4aa324d01a5641cd8 Mon Sep 17 00:00:00 2001 From: vhyrro Date: Mon, 8 Jul 2024 14:52:29 +0200 Subject: [PATCH] chore: check for neovim version on startup --- lua/neorg/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/neorg/init.lua b/lua/neorg/init.lua index af4bc9029..f0a38502a 100644 --- a/lua/neorg/init.lua +++ b/lua/neorg/init.lua @@ -3,7 +3,7 @@ --- @brief ]] local neorg = require("neorg.core") -local config, log, modules = neorg.config, neorg.log, neorg.modules +local config, log, modules, utils = neorg.config, neorg.log, neorg.modules, neorg.utils --- @module "neorg.core.config" @@ -12,6 +12,9 @@ local config, log, modules = neorg.config, neorg.log, neorg.modules --- @see config.user_config --- @see neorg.configuration.user function neorg.setup(cfg) + -- Ensure that we are running Neovim 0.10+ + assert(utils.is_minimum_version(0, 10, 0), "Neorg requires at least Neovim version 0.10 to operate!") + -- If the user supplied no configuration then generate a default one (assume the user wants the defaults) cfg = cfg or { load = {