aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_editor.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-03-10 15:46:18 +0100
committerGitHub <noreply@github.com>2022-03-10 15:46:18 +0100
commit6170574d2faae4e30f49098e4947075bb0bdd3b5 (patch)
tree3d1ec8f9d5d72f7940bc4b2a4b06e9cd4a3ac825 /runtime/lua/vim/_editor.lua
parent3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7 (diff)
parent5ed60804fe69e97a699ca64422f4f7f4cc20f3da (diff)
downloadrneovim-6170574d2faae4e30f49098e4947075bb0bdd3b5.tar.gz
rneovim-6170574d2faae4e30f49098e4947075bb0bdd3b5.tar.bz2
rneovim-6170574d2faae4e30f49098e4947075bb0bdd3b5.zip
Merge pull request #17660 from bfredl/luacomplete
feat(lua): handle lazy submodules in `:lua vim.` wildmenu completion
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
-rw-r--r--runtime/lua/vim/_editor.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index 2251aca004..3136e36043 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -519,6 +519,8 @@ function vim._expand_pat(pat, env)
local mt = getmetatable(final_env)
if mt and type(mt.__index) == "table" then
field = rawget(mt.__index, key)
+ elseif final_env == vim and vim._submodules[key] then
+ field = vim[key]
end
end
final_env = field
@@ -545,6 +547,9 @@ function vim._expand_pat(pat, env)
if mt and type(mt.__index) == "table" then
insert_keys(mt.__index)
end
+ if final_env == vim then
+ insert_keys(vim._submodules)
+ end
table.sort(keys)