sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.92k stars 107 forks source link

[Bug] DiffviewGlobal is nil #511

Open lewisdiamond opened 3 months ago

lewisdiamond commented 3 months ago

Description

Is diffview.lib is require()d without having imported diffview.bootstrap first, diffview crashes attempting to index a nil value.

Expected behavior

requiring bootstrap should not be necessary for using lib. For example: https://github.com/harrisoncramer/gitlab.nvim/blob/96d7e16ef7b26e42fdf813fd32f39d096aed33e1/lua/gitlab/reviewer/init.lua#L12

Actual behavior

diffview/lib.lua:12: attempt to index global 'DiffviewGlobal' (a nil value)

Steps to reproduce

  1. require("bootstrap.lib")

Health check

Output of :checkhealth diffview ``` ####################### ### PUT OUTPUT HERE ### ####################### ```

Log info

Relevant info from :DiffviewLog ``` ############################ ### PUT LOG CONTENT HERE ### ############################ ```

Neovim version

nvim 0.9.5

Operating system and version

Linux

Minimal config

n/a