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",
|
"mfussenegger/nvim-dap",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
"rcarriga/nvim-dap-ui",
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-neotest/nvim-nio"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
config = function ()
|
opts = {},
|
||||||
|
config = function (_, opts)
|
||||||
local icons = require('user.icons')
|
local icons = require('user.icons')
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
local dapui = require("dapui")
|
local dapui = require("dapui")
|
||||||
|
|
@ -37,36 +33,15 @@ return {
|
||||||
dapui.close()
|
dapui.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
dap.adapters.php = {
|
for name, config in pairs(opts) do
|
||||||
type = 'executable',
|
dap.adapters[name] = config.adapter or {}
|
||||||
command = 'node',
|
dap.configurations[name] = config.configurations or {}
|
||||||
args = { '/home/pnx/vscode-php-debug/out/phpDebug.js' }
|
end
|
||||||
}
|
|
||||||
|
|
||||||
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}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
"nvim-neotest/nvim-nio"
|
"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