Environment

  1. MacOS Tahoe on Macbook Air M3
  2. neovim: 0.11.4
  3. Related plugins:

Problem

I have forgotten what I did, but suddenly, lazy started trying to download and compile nvim-dap-python, and always failed.

It provided some useless information, saying something error about Luarocks, with wrong Lua version…, somehow Lazy thought it needed to install a new nvim-dap-python.

Actually, if I ignored the shining error message, nvim-dap-python worked fine with python files, or any django projects.

Solution

  1. config nvim-dap-python in related files (mine is debug.lua)
{
  'mfussenegger/nvim-dap-python',
  build = false,  # THIS IS THE KEY
  lazy = true,
  config = function()
    local dap_python = require 'dap-python'
    dap_python.setup 'uv'
  end,
},
  1. empty lazy-rocks cache directory (normal path on Mac: ~/.local/share/nvim/lazy-rocks/)
rm -rf ~/.local/share/nvim/lazy-rocks

rm -rf ~/.local/share/nvim/lazy
# Yes, I did delete the lazy, too, to make sure I really got rid of it!

After reinstall all the plugins, everything looks fine by now.