Skip to content

fix(file): use buftype=acwrite for stage-0 buffers to prevent LSP interference#81

Merged
dlyongemallo merged 1 commit intomainfrom
fix_clangd_buffers
Apr 6, 2026
Merged

fix(file): use buftype=acwrite for stage-0 buffers to prevent LSP interference#81
dlyongemallo merged 1 commit intomainfrom
fix_clangd_buffers

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

@dlyongemallo dlyongemallo commented Apr 3, 2026

Relates to #73.

Copilot AI review requested due to automatic review settings April 3, 2026 09:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents Neovim’s built-in LspAttach inlay-hint logic from issuing textDocument/inlayHint requests using the unsupported diffview:// URI by disabling inlay hints on Diffview buffers before filetype detect can trigger LSP attachment.

Changes:

  • Disable inlay hints on newly created diffview:// buffers immediately before running :filetype detect.
  • Add a functional test asserting inlay hints are disabled on diffview:// buffers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lua/diffview/vcs/file.lua Disables inlay hints prior to filetype detection to avoid inlay-hint requests for diffview:// URIs.
lua/diffview/tests/functional/file_spec.lua Adds a functional test for inlay-hints-disabled behavior on diffview:// buffers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/tests/functional/file_spec.lua Outdated
@dlyongemallo dlyongemallo changed the title fix(file): disable inlay hints on diffview:// buffers before filetype detection fix(file): use buftype=acwrite for stage-0 buffers to prevent LSP interference Apr 4, 2026
@dsirov
Copy link
Copy Markdown

dsirov commented Apr 6, 2026

Tested.
Solves #73.

💯

@dlyongemallo dlyongemallo merged commit 45cf1e1 into main Apr 6, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the fix_clangd_buffers branch April 6, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants