nvim-flutter / nvim-flutter/flutter-tools.nvim

File changes made by Aider causing the LSP to detach from the buffer, reopening buffer fixes it

Open
#446 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
1.4k
Forks
116
Avg merge
3m
Merged PRs (30d)
1

Description

I sometimes use Aider to make quick changes in files. It makes the modifications in the background, but, when it's done, sometimes (not always) the LSP will detach from the buffer. It will still work on other open Dart buffers, but not the modified one. I also tried running LspStart and LspRestart, but that didn't help. LspInfo still shows the client as active, just not attached to the buffer. Usually closing and reopening the buffer fixes it.

Any ideas on where to look? I can provide any additional info if required.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the reported Aider edit on a Dart buffer, then compare LspInfo before and after the background change and after LspRestart. The issue is resolved when the LSP remains attached to the modified buffer without needing to close and reopen it; no file or test is identified in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter, lua, neovim
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.