Skip to content

Commit

Permalink
feat(dap): add custom commands to dap
Browse files Browse the repository at this point in the history
- Extends the `DAP`commands repertoire with `hotReload` and `hotRestart` as `.hot-reload` and `.hot-restart`
  • Loading branch information
ch-vik authored and sidlatau committed Oct 1, 2023
1 parent 0b01c71 commit af591f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/flutter-tools/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ function M.setup(config)
args = { "debug-adapter" },
}
opts.register_configurations(paths)
local repl = require("dap.repl")
repl.commands = vim.tbl_extend("force", repl.commands, {
custom_commands = {
[".hot-reload"] = function() dap.session():request("hotReload") end,
[".hot-restart"] = function() dap.session():request("hotRestart") end,
},
})
else
dap.adapters.dart = {
type = "executable",
Expand Down

0 comments on commit af591f5

Please sign in to comment.