diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-03-06 13:23:03 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2023-03-06 14:51:56 +0100 |
commit | e31e49a8e3aac25e923dce15cc76dca4a447947f (patch) | |
tree | a00172499bce9c7b52a1591aa9bada742bbfb351 /runtime/lua/vim/_init_packages.lua | |
parent | 0e7196438d8f856eecd7c90e160b79cbc8fb08dc (diff) | |
download | rneovim-e31e49a8e3aac25e923dce15cc76dca4a447947f.tar.gz rneovim-e31e49a8e3aac25e923dce15cc76dca4a447947f.tar.bz2 rneovim-e31e49a8e3aac25e923dce15cc76dca4a447947f.zip |
refactor(vim.version): cleanup
- version.cmp(): assert valid version
- add test for loading vim.version (the other tests use shared.lua in
the test runner)
- reduce test scopes, reword test descriptions
Diffstat (limited to 'runtime/lua/vim/_init_packages.lua')
-rw-r--r-- | runtime/lua/vim/_init_packages.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/_init_packages.lua b/runtime/lua/vim/_init_packages.lua index d032026796..57c0fc9122 100644 --- a/runtime/lua/vim/_init_packages.lua +++ b/runtime/lua/vim/_init_packages.lua @@ -51,7 +51,10 @@ end -- builtin functions which always should be available require('vim.shared') -vim._submodules = { inspect = true } +vim._submodules = { + inspect = true, + version = true, +} -- These are for loading runtime modules in the vim namespace lazily. setmetatable(vim, { @@ -69,9 +72,6 @@ setmetatable(vim, { t[key] = val return t[key] end - elseif key == 'version' then - t[key] = require('vim.version') - return t[key] end end, }) |