diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-03-06 10:03:55 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-03-06 10:45:22 +0000 |
commit | ea44f74d84f87ce5aff2ef7797be986900bd74a6 (patch) | |
tree | e726c49d53d6a2a4b1be85f0df2fd4eccebc026e /runtime/lua/vim/_init_packages.lua | |
parent | d72c9d1d194fd050c3f5e95a6b5c319a8afa1a8f (diff) | |
download | rneovim-ea44f74d84f87ce5aff2ef7797be986900bd74a6.tar.gz rneovim-ea44f74d84f87ce5aff2ef7797be986900bd74a6.tar.bz2 rneovim-ea44f74d84f87ce5aff2ef7797be986900bd74a6.zip |
refactor(types): more fixes
Diffstat (limited to 'runtime/lua/vim/_init_packages.lua')
-rw-r--r-- | runtime/lua/vim/_init_packages.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/lua/vim/_init_packages.lua b/runtime/lua/vim/_init_packages.lua index 71ac3bcfcd..d0bb91114e 100644 --- a/runtime/lua/vim/_init_packages.lua +++ b/runtime/lua/vim/_init_packages.lua @@ -1,5 +1,5 @@ -local pathtrails = {} -vim._so_trails = {} +local pathtrails = {} --- @type table<string,true> ta +vim._so_trails = {} --- @type string[] for s in (package.cpath .. ';'):gmatch('[^;]*;') do s = s:sub(1, -2) -- Strip trailing semicolon -- Find out path patterns. pathtrail should contain something like @@ -65,6 +65,7 @@ vim._submodules = { -- These are for loading runtime modules in the vim namespace lazily. setmetatable(vim, { + --- @param t table<any,any> __index = function(t, key) if vim._submodules[key] then t[key] = require('vim.' .. key) @@ -73,6 +74,7 @@ setmetatable(vim, { require('vim._inspector') return t[key] elseif vim.startswith(key, 'uri_') then + --- @type any? local val = require('vim.uri')[key] if val ~= nil then -- Expose all `vim.uri` functions on the `vim` module. |