From 79571b92ced968ad27bee2a7515a4a04e84dbad2 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Wed, 27 Jan 2021 09:00:28 +0100 Subject: feat(lua): omnifunc for builting lua interpreter also make implicit submodules "uri" and "_inspector" work with completion this is needed for `:lua=vim.uri_` wildmenu completion to work even before uri or _inspector functions are used. --- test/functional/lua/command_line_completion_spec.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/functional/lua/command_line_completion_spec.lua') 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) -- cgit From 1fe1bb084d0099fc4f9bfdc11189485d0f74b75a Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 19 Dec 2022 16:37:45 +0000 Subject: refactor(options): deprecate nvim[_buf|_win]_[gs]et_option Co-authored-by: zeertzjq Co-authored-by: famiu --- test/functional/lua/command_line_completion_spec.lua | 8 -------- 1 file changed, 8 deletions(-) (limited to 'test/functional/lua/command_line_completion_spec.lua') diff --git a/test/functional/lua/command_line_completion_spec.lua b/test/functional/lua/command_line_completion_spec.lua index 9a0d534358..177e077f4a 100644 --- a/test/functional/lua/command_line_completion_spec.lua +++ b/test/functional/lua/command_line_completion_spec.lua @@ -31,14 +31,12 @@ describe('nlua_expand_pat', function() eq( {{ 'nvim_buf_set_lines', - 'nvim_buf_set_option' }, 8 }, get_completions('vim.api.nvim_buf_', { vim = { api = { nvim_buf_set_lines = true, - nvim_buf_set_option = true, nvim_win_doesnt_match = true, }, other_key = true, @@ -68,14 +66,12 @@ describe('nlua_expand_pat', function() eq( {{ 'nvim_buf_set_lines', - 'nvim_buf_set_option' }, 11 }, get_completions('vim["api"].nvim_buf_', { vim = { api = { nvim_buf_set_lines = true, - nvim_buf_set_option = true, nvim_win_doesnt_match = true, }, other_key = true, @@ -88,7 +84,6 @@ describe('nlua_expand_pat', function() eq( {{ 'nvim_buf_set_lines', - 'nvim_buf_set_option' }, 21 }, get_completions('vim["nested"]["api"].nvim_buf_', { @@ -96,7 +91,6 @@ describe('nlua_expand_pat', function() nested = { api = { nvim_buf_set_lines = true, - nvim_buf_set_option = true, nvim_win_doesnt_match = true, }, }, @@ -121,7 +115,6 @@ describe('nlua_expand_pat', function() eq( {{ 'nvim_buf_set_lines', - 'nvim_buf_set_option' }, 12 }, get_completions('vim[MY_VAR].nvim_buf_', { @@ -129,7 +122,6 @@ describe('nlua_expand_pat', function() vim = { api = { nvim_buf_set_lines = true, - nvim_buf_set_option = true, nvim_win_doesnt_match = true, }, other_key = true, -- cgit