Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Severe lag: repeated $/lean/rpc/call request storm in <1s

Open
#442 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
lua, neovim
Domain
tooling

Research direction

Reproduce the lag in section_3_1.lean around line 283 with the listed Neovim plugins and inspect the attached debug.log for repeated $/lean/rpc/call requests. Start by tracing the lean.nvim integration or Neovim event handling during “\in” input, then verify that identical requests are debounced or merged and Unicode conversion no longer causes noticeable lag.

Written by the indexing model from the issue text.

Description

Hi, I’m seeing severe lag specifically while typing in Lean files.

From Neovim’s LSP log, there is a “request storm” where the client repeatedly sends identical $/lean/rpc/call requests (e.g., Lean.Widget.getWidgets / Lean.Widget.getInteractiveTermGoal) to the same position dozens of times within less than one second.

Additionally, Lean’s built-in Unicode input is very slow in this setup: typing “\in” at the end of the line and waiting for it to convert to “∈” takes a long time.

Environment:

  • Neovim: 0.11.2

  • lean.nvim: latest

  • Lean toolchain: Lean 4.24.0 (arm64-apple-darwin23.6.0), commit 797c613eb9b6d4ec95db23e3e00af9ac6657f24b, Release

  • OS: macOS 15.6.1 (24G90)

  • Plugin manager: lazy.nvim

Minimal reproducible setup:

  • Plugins enabled:

    • lazy.nvim
    • lean.nvim
    • nvim-lspconfig
    • plenary.nvim
  • File: section_3_1.lean (https://gist.github.com/yd278/15437d60c8b068b148373e0914facb6b)

  • Steps:

    1. Open the file and go to around line 283. Wait until the server finish processing the file.

    2. Type “\in” at the end of the line (use Lean’s Unicode input).

    3. Observe that converting to “∈” takes a long time, and the editor becomes laggy.

    4. LSP log shows many identical $/lean/rpc/call requests within <1s to the same position.

Comparison with VS Code:

  • Running the same file and performing the same typing (“\in” → “∈”) in VS Code does not lag.

  • This suggests the issue is likely in the Neovim client side (lean.nvim integration or event handling), rather than the language server itself.

Observed behavior:

  • During typing, Neovim rapidly issues many identical $/lean/rpc/call requests in under a second, causing noticeable lag.

  • Unicode input (“\in” → “∈”) conversion is particularly slow.

Expected behavior:

  • Requests should be debounced/merged; typing (including Unicode sequences) should not cause a storm of identical RPC calls or noticeable lag.

Logs:

  • Neovim LSP log excerpt attached

debug.log

Dominant language
Lua
Stars
607
Forks
63
Avg merge
1d 8h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Julian/lean.nvim

All issues in Julian/lean.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.