aboutsummaryrefslogtreecommitdiffstats
path: root/after/ftplugin/make.vim
AgeCommit message (Collapse)Author
2022-03-01add make filetype fileAriel D'Alessandro
5 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
local dap = require('dap')

dap.adapters.mix_task = {
  type = 'executable',
  command = 'elixir-ls-debugger',  -- El comando 'elixir-ls' está en $PATH
  args = {}
}

dap.configurations.elixir = {
  {
    type = "mix_task",
    name = "mix (Default task)",
    request = "launch",
    projectDir = "${workspaceRoot}"
  },
  {
    type = "mix_task",
    name = "mix test",
    request = "launch",
    task = 'test',
    env = {
      MIX_ENV = "test",
      MIX_TARGET = "host",
      HEX_UNSAFE_HTTPS = 1
    },
    taskArgs = {"--trace"},
    startApps = true, -- for Phoenix projects
    projectDir = "${workspaceFolder}",
    requireFiles = {
      "test/**/test_helper.exs",
      "test/**/*_test.exs"
    }
  },
  {
    type = "mix_task",
    name = "phx server",
    request = "launch",
    stackTraceMode = "all",
    task = 'phx.server',
    debugAutoInterpretAllModules = true,
    noDebug = false,
    exitAfterTaskReturns = false,
    env = {
      MIX_ENV = "dev",
      MIX_TARGET = "host",
      HEX_UNSAFE_HTTPS = 1
    },
    startApps = false, -- for Phoenix projects
    taskArgs = {"--no-halt", "--open"},
    projectDir = "${workspaceFolder}",
  },
}