Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Getting `Vim:E95: Buffer with this name already exists` error with `lean://stderr` buffer

Aperta
#562 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
lua, neovim
Ambito
devtools

Direzione di ricerca

Start at stderr.show in the stderr output module, where Buffer.create is called with the name lean://stderr inside vim.schedule. Check how Buffer.create applies the name via vim.api.nvim_buf_set_name, and why a second buffer with that name collides when the existing one is still valid. Done means reproducing the E95 error, then creating the stderr buffer without the collision, with a test covering two creations.

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

Descrizione

I'm not entirely sure how to trigger this. It happens on this line (the Buffer.create line)

---Show stderr output in a separate stderr buffer.
---@param message string a (possibly multi-line) string from stderr
function stderr.show(message)
  vim.schedule(function()
    if not current.buffer or not current.buffer:is_valid() then
      current.buffer = Buffer.create {
        name = 'lean://stderr',
        listed = false,
        scratch = true,
        options = { buftype = 'nofile' },
      }
      current.window = nil
    end

then vim.api.nvim_buf_set_name(bufnr, opts.name).

perhaps it suffices to have an already-open lean://stderr and trigger the creation of another?

Lingua principale
Lua
Stelle
601
Fork
61
Merge medio
3g 14h
PR unite (30g)
7

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 Julian/lean.nvim

Tutte le issue di Julian/lean.nvim

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.