diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-09 08:47:02 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-09 08:47:02 +0200 |
| commit | b5af6000bdacef641182bd094dc23908dde14110 (patch) | |
| tree | afdfc5fcb4fe871c0bdb25839f8ed3c02675ed94 /lua/alpha/dap.lua | |
| parent | 7d5683672cdf1d73914b637b7266e5602f3ac34b (diff) | |
| download | nvim-conf-b5af6000bdacef641182bd094dc23908dde14110.tar.gz nvim-conf-b5af6000bdacef641182bd094dc23908dde14110.zip | |
Add composer check locally to avoid needing external library for that
Diffstat (limited to 'lua/alpha/dap.lua')
| -rw-r--r-- | lua/alpha/dap.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/alpha/dap.lua b/lua/alpha/dap.lua index e1bcf87..74004e7 100644 --- a/lua/alpha/dap.lua +++ b/lua/alpha/dap.lua @@ -1,4 +1,5 @@ local dap, dapui, dap_go = require("dap"), require("dapui"), require("dap-go") +local composer = require("alpha.composer") require("nvim-dap-virtual-text").setup({}) -- dap.set_log_level('TRACE') @@ -53,9 +54,7 @@ dap.configurations.php = { name = "Listen for Xdebug", port = 9003, pathMappings = function() - -- TODO change this to not depends on the composer - local sail = vim.call("composer#query", "require-dev.laravel/sail") - if sail == "" then + if composer.query({"require-dev", "laravel/sali"}) ~= nil then return { ["/app"] = vim.fn.getcwd() } end return { ["/var/www/html"] = vim.fn.getcwd() } |