Regression: emmylua_ls cannot autocomplete members of tables defined outside the active file

Aperta
#1,357 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Start by reading commit e1cd626e and the completion handling path for textDocument/completion; the report provides a minimal Neovim configuration and a TCP server command to reproduce the regression. Check why completion for the standard io table returns an empty result, then confirm the members appear in Neovim after the fix.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

After commit e1cd626e, emmylua_ls can no longer autocomplete members of a table defined outside the active file.

Reproducing

minimal repro.lua
vim.lsp.config("emmylua_ls", {
  cmd = vim.lsp.rpc.connect("localhost", 5007),
  filetypes = { 'lua' },
})


vim.lsp.enable("emmylua_ls")

Start emmylua_ls in tcp mode

cargo run -p emmylua_ls -- -c tcp --log-level debug --log-path /dev/stdout

Connect to emmylua_ls

nvim --clean -u repro.lua test.lua

Input io. in buffer, the press Ctrl-x Ctrl-o sequence to send a completion request

io.|
Actual behaviour

No completion result was returned to Neovim, as suggested by both the Neovim UI and the server logs.

[2026-11-04 11:45:07 +00:00 DEBUG lsp_server::msg] < {"method":"textDocument/completion","id":12,"params":{"context":{"triggerKind":1},"textDocument":{"uri":"file:///home/memchr/tmp/a.lua"},"position":{"line":0,"character":3}},"jsonrpc":"2.0"}
[2026-11-04 11:45:07 +00:00 DEBUG lsp_server::msg] > {"jsonrpc":"2.0","id":12,"result":[]}
Expected behavior

A list of members of the io table was returned to Neovim.

Image
Lingua principale
Rust
Stelle
530
Fork
111
Merge medio
2g 6h
PR unite (30g)
32

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EmmyLuaLs/emmylua-analyzer-rust

Tutte le issue di EmmyLuaLs/emmylua-analyzer-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.