neovim / neovim

Vim-fork focused on extensibility and usability
https://neovim.io
Other
82.56k stars 5.65k forks source link

Missing completion items when typing `vim.iter({})` #27711

Closed MariaSolOs closed 7 months ago

MariaSolOs commented 7 months ago

Problem

When typing vim.iter({}):, completions for the module's functions are missing.

Steps to reproduce

  1. Write the following configuration to repro.lua:
    
    local plugins = {
    lspconfig = 'https://github.com/neovim/nvim-lspconfig.git',
    }

vim.env.PATH = vim.env.PATH .. ':' .. vim.fn.stdpath 'data' .. '/mason/bin'

for name, url in pairs(plugins) do local install_path = 'repro/' .. name if vim.fn.isdirectory(install_path) == 0 then vim.fn.system { 'git', 'clone', '--depth=1', url, install_path } end vim.o.runtimepath = install_path .. ',' .. vim.o.runtimepath end

vim.bo.omnifunc = 'v:lua.vim.lsp.omnifunc' require'lspconfig'.lua_ls.setup {}



2. Run `nvim --clean -u repro.lua repro.lua`.
3. Type `ggOvim.iter({}):<C-x><C-o>`.
4. Notice how no LSP completions (such as `any`, `map`, etc) are provided.

### Expected behavior

Completions for `vim.iter` to be provided.

### Neovim version (nvim -v)

v0.10.0-dev-dc8c086c7

### Vim (not Nvim) behaves the same?

No

### Operating system/version

Fedora Linux Asahi

### Terminal name/version

wezterm 20240226_174525_22424c32

### $TERM environment variable

wezterm

### Installation

From source
MariaSolOs commented 7 months ago

cc @lewis6991