sindrets / diffview.nvim

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

`attempt to call field 'nvim__get_hl_defs' (a nil value)` on startup #332

Closed shawnyu5 closed 1 year ago

shawnyu5 commented 1 year ago

Get the following message on startup:

Failed to run `config` for diffview.nvim                                                       
....local/share/nvim/lazy/diffview.nvim/lua/diffview/hl.lua:124: attempt to call field 'nvim__g
et_hl_defs' (a nil value)                                                                      
# stacktrace:                                                                                  
  - /diffview.nvim/lua/diffview/hl.lua:124 _in_ **get_hl**                                     
  - /diffview.nvim/lua/diffview/hl.lua:147 _in_ **get_hl_attr**                                
  - /diffview.nvim/lua/diffview/hl.lua:166 _in_ **get_fg**                                     
  - /diffview.nvim/lua/diffview/hl.lua:430 _in_ **update_diff_hl**                             
  - /diffview.nvim/lua/diffview/hl.lua:439 _in_ **setup**                                      
  - /diffview.nvim/lua/diffview/init.lua:25 _in_ **init**                                      
  - /diffview.nvim/lua/diffview/init.lua:260                                                   
  - .config/nvim/lua/shawn/diffview.lua:2       

diffview.lua:

local actions = require("diffview.actions")
require("diffview").setup()

nvim --version: NVIM v0.9.0-dev-1288+g4863ca6b8

cleong14 commented 1 year ago

Likely related to #327

3699394 commented 1 year ago

same as https://github.com/sindrets/diffview.nvim/issues/327 and fixed by my pr https://github.com/sindrets/diffview.nvim/pull/326

sindrets commented 1 year ago

Closing as duplicate of #327.