Skip to content

Document for URI could not be found: file:///real/path/file.txt #657

Closed

Description

@carlos-algms

If the file name changes, in the same buffer, every key press triggers an error until you reset neovim.

[Copilot.lua] RPC[Error] code_name = InvalidParams, message = "Document for URI could not be found: 
  file:///redacted/file.txt"

This can happen when:

  1. a new file got saved and hence gets a new name
  2. user run :file new-name.txt

Activity

  1. AntoineGS commented on Feb 27, 2026

    @AntoineGS
    Collaborator

    Hmm I thought I had dealt with this last year, I guess not! I'll take a look.

  2. AntoineGS commented on Feb 28, 2026

    @AntoineGS
    Collaborator

    I think I got it, let me know if it works!

  3. added a commit that references this issue on Feb 28, 2026
    4c50628
  4. added a commit that references this issue on Sep 10, 2026
    5538e6c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions