aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/command_line_completion_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-01-27 09:00:28 +0100
committerbfredl <bjorn.linse@gmail.com>2023-03-06 23:12:21 +0100
commit79571b92ced968ad27bee2a7515a4a04e84dbad2 (patch)
tree3e681a92b6fc113390f68ad2f39b91699e57c508 /test/functional/lua/command_line_completion_spec.lua
parented05d38d9fa643c7e562b754c6cfed8b9da5c4d8 (diff)
downloadrneovim-79571b92ced968ad27bee2a7515a4a04e84dbad2.tar.gz
rneovim-79571b92ced968ad27bee2a7515a4a04e84dbad2.tar.bz2
rneovim-79571b92ced968ad27bee2a7515a4a04e84dbad2.zip
feat(lua): omnifunc for builting lua interpreter
also make implicit submodules "uri" and "_inspector" work with completion this is needed for `:lua=vim.uri_<tab>` wildmenu completion to work even before uri or _inspector functions are used.
Diffstat (limited to 'test/functional/lua/command_line_completion_spec.lua')
-rw-r--r--test/functional/lua/command_line_completion_spec.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/lua/command_line_completion_spec.lua b/test/functional/lua/command_line_completion_spec.lua
index 3a5966755e..9a0d534358 100644
--- a/test/functional/lua/command_line_completion_spec.lua
+++ b/test/functional/lua/command_line_completion_spec.lua
@@ -5,7 +5,7 @@ local eq = helpers.eq
local exec_lua = helpers.exec_lua
local get_completions = function(input, env)
- return exec_lua("return {vim._expand_pat(...)}", '^' .. input, env)
+ return exec_lua("return {vim._expand_pat(...)}", input, env)
end
local get_compl_parts = function(parts)
@@ -107,9 +107,12 @@ describe('nlua_expand_pat', function()
end)
it('should work with lazy submodules of "vim" global', function()
- eq({{ 'inspect' }, 4 },
+ eq({{ 'inspect', 'inspect_pos' }, 4 },
get_completions('vim.inspec'))
+ eq({{ 'treesitter' }, 4 },
+ get_completions('vim.treesi'))
+
eq({{ 'set' }, 11 },
get_completions('vim.keymap.se'))
end)