Skip to content

[Bug] diagnostics don't show up when comparing to other branches #580

Open
@RyanSaxe

Description

@RyanSaxe

Description

I am currently using diffview to get a good view of a PR. So I usually open

DiffViewOpen main..HEAD

when I do, I see no diagnostics at all. If I type gf to open the corresponding file, I can clearly see it should show diagnostics.

furthermore, if I change a file and open DiffViewOpen, then I will see diagnostics just fine!

Is this purposeful because of complexities of version changes and such when doing longer time horizon comparisons? If so, it feels like you could still at least show diagnostics on the newest version.

Expected behavior

I should be able to see my inline diagnostics in diffview regardless of what I am comparing against.

Actual behavior

there are no diagnostics at all in diffview when comparing vs branches

Steps to reproduce

  1. install lazyvim
  2. add diffview
  3. enable any LSP (I am using basedpyright)
  4. confirm OpenDiffView and OpenDiffView branch..HEAD have different behavior

Health check

Output of :checkhealth diffview

==============================================================================
diffview:                                   require("diffview.health").check()

Checking plugin dependencies ~
- ✅ OK nvim-web-devicons installed.

Checking VCS tools ~
- The plugin requires at least one of the supported VCS tools to be valid.
- ✅ OK Git found.
- ✅ OK Git is up-to-date. (2.39.3)
- ⚠️ WARNING Configured `hg_cmd` is not executable: 'hg'

Log info

Relevant info from :DiffviewLog
[INFO  2025-06-08 09:30:27.016 -0400] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/lib.lua:24: [command call] :DiffviewOpen origin/develop..HEAD
[INFO  2025-06-08 09:30:27.099 -0400] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:488: [DiffView] Completed update for 47 files successfully (33.943 ms)

Neovim version

NVIM v0.11.1
Build type: Release
LuaJIT 2.1.1744318430

Operating system and version

MacOS 14.7

Minimal config

I am not super familiar with neovim yet. But I tested with LazyVim, starting from the kickstarter point, if that's helpful.

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