LunarVim / lunarvim.org

🌐 Website for LunarVim
https://www.lunarvim.org
GNU General Public License v3.0
137 stars 204 forks source link

Lua warning for Scala config #419

Open marekrehora opened 1 year ago

marekrehora commented 1 year ago

Hey,

I was trying out LunarVim to use as an alternative for Intellij and following the docs for Scala I was getting this warning:

WARN ] lvim: "Invalid configuration: /Users/rehora/.config/lvim/config.lua:40: attempt to index global 'dap' (a nil value)" file="[C]", line=-1

I was able to fix it by adding this line before the config from docs: local dap = require("dap"

But I am very new to nvim and lua so I am not sure if it is correct solution and therefore I did not do a PR for the docs.

LostNeophyte commented 1 year ago

the example in the docs looks incorrect, it should be

lvim.builtin.dap.on_config_done = function(dap)
-- use dap here
end

you can require dap, you need to do it in a callback function