mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
nvim/lua/user/plugins/ide/debugger.lua: move php stuff to its own file
This commit is contained in:
parent
4992b19c44
commit
42c486d196
2 changed files with 45 additions and 33 deletions
|
|
@ -2,14 +2,10 @@ return {
|
|||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
dependencies = {
|
||||
"nvim-neotest/nvim-nio"
|
||||
}
|
||||
}
|
||||
"rcarriga/nvim-dap-ui",
|
||||
},
|
||||
config = function ()
|
||||
opts = {},
|
||||
config = function (_, opts)
|
||||
local icons = require('user.icons')
|
||||
local dap = require('dap')
|
||||
local dapui = require("dapui")
|
||||
|
|
@ -37,36 +33,15 @@ return {
|
|||
dapui.close()
|
||||
end
|
||||
|
||||
dap.adapters.php = {
|
||||
type = 'executable',
|
||||
command = 'node',
|
||||
args = { '/home/pnx/vscode-php-debug/out/phpDebug.js' }
|
||||
}
|
||||
|
||||
dap.configurations.php = {
|
||||
{
|
||||
name = "PHP: Listen for Xdebug",
|
||||
port = 9003,
|
||||
request = "launch",
|
||||
type = "php",
|
||||
breakpoints = {
|
||||
exception = {
|
||||
Notice = false,
|
||||
Warning = false,
|
||||
Error = false,
|
||||
Exception = false,
|
||||
["*"] = false,
|
||||
},
|
||||
},
|
||||
pathMappings = {
|
||||
["/app"] = "${workspaceFolder}"
|
||||
}
|
||||
},
|
||||
}
|
||||
for name, config in pairs(opts) do
|
||||
dap.adapters[name] = config.adapter or {}
|
||||
dap.configurations[name] = config.configurations or {}
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
"nvim-neotest/nvim-nio"
|
||||
|
|
|
|||
37
nvim/lua/user/plugins/lang/php/dap.lua
Normal file
37
nvim/lua/user/plugins/lang/php/dap.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
local mason = require('user.utils.mason')
|
||||
|
||||
return {
|
||||
mason.ensure_installed('php-debug-adapter'),
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
opts = {
|
||||
php = {
|
||||
adapter = {
|
||||
type = 'executable',
|
||||
command = mason.binary('php-debug-adapter'),
|
||||
},
|
||||
configurations = {
|
||||
{
|
||||
name = "PHP: Listen for Xdebug",
|
||||
port = 9003,
|
||||
request = "launch",
|
||||
type = "php",
|
||||
breakpoints = {
|
||||
exception = {
|
||||
Notice = false,
|
||||
Warning = false,
|
||||
Error = false,
|
||||
Exception = false,
|
||||
["*"] = false,
|
||||
},
|
||||
},
|
||||
pathMappings = {
|
||||
["/app"] = "${workspaceFolder}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue