diff options
author | Phạm Bình An <111893501+brianhuster@users.noreply.github.com> | 2025-03-26 06:35:12 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-26 07:35:12 +0800 |
commit | 6b00c9acfde954a3e992a2932eca9fa5902a1298 (patch) | |
tree | 508b05698449c06573e562088d5085ffccd65fce /test/functional/lua | |
parent | a3b4743b4341d857ffc8a103f25ccb42ebc0e292 (diff) | |
download | rneovim-6b00c9acfde954a3e992a2932eca9fa5902a1298.tar.gz rneovim-6b00c9acfde954a3e992a2932eca9fa5902a1298.tar.bz2 rneovim-6b00c9acfde954a3e992a2932eca9fa5902a1298.zip |
fix(lua): no omni/cmdline completion for vim.env (#33044)
Problem:
- `:lua vim.env.<Tab>` does not show completion of environment variables
- Meanwhile, `:let $<Tab>` does show completion of environment variables
Solution:
- Fix it
Diffstat (limited to 'test/functional/lua')
-rw-r--r-- | test/functional/lua/command_line_completion_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/lua/command_line_completion_spec.lua b/test/functional/lua/command_line_completion_spec.lua index ee3d0325e1..7883480125 100644 --- a/test/functional/lua/command_line_completion_spec.lua +++ b/test/functional/lua/command_line_completion_spec.lua @@ -269,6 +269,18 @@ describe('nlua_expand_pat', function() } eq(expected, actual) end) + + it('vim.env', function() + exec_lua [[ + vim.env.NLUA_ENV_VAR = 'foo' + ]] + local actual = get_completions('vim.env.NLUA') + local expected = { + { 'NLUA_ENV_VAR' }, + #'vim.env.', + } + eq(expected, actual) + end) end) describe('completes', function() |