mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-28 11:40:13 +02:00
feat(dap): added extra for dap nlua
This commit is contained in:
parent
bc14e02a1f
commit
f562d1d197
1 changed files with 27 additions and 0 deletions
27
lua/lazyvim/plugins/extras/dap/nlua.lua
Normal file
27
lua/lazyvim/plugins/extras/dap/nlua.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
|
||||
dependencies = {
|
||||
{
|
||||
"jbyuki/one-small-step-for-vimkind",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>daL", function() require("osv").launch({ port = 8086 }) end, desc = "Adapter Lua Server" },
|
||||
{ "<leader>dal", function() require("osv").run_this() end, desc = "Adapter Lua" },
|
||||
},
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
dap.adapters.nlua = function(callback, config)
|
||||
callback({ type = "server", host = config.host or "127.0.0.1", port = config.port or 8086 })
|
||||
end
|
||||
dap.configurations.lua = {
|
||||
{
|
||||
type = "nlua",
|
||||
request = "attach",
|
||||
name = "Attach to running Neovim instance",
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue