aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2023-12-11 09:02:14 -0300
committerElvis Claros Castro <elvis@claros.ar>2023-12-11 09:02:14 -0300
commit4b6ba2bd7b40ce150ff597142dc169d3478d4d7d (patch)
treeba5c7afbbf5c747e89a841856bf8efe26fcb7364 /lua/alpha
parent417ff0c6ea882e88c0f76f8e62ec25a23e3e7f4e (diff)
downloadnvim-conf-4b6ba2bd7b40ce150ff597142dc169d3478d4d7d.tar.gz
nvim-conf-4b6ba2bd7b40ce150ff597142dc169d3478d4d7d.zip
Feat: Debug for flutter-dart
Diffstat (limited to 'lua/alpha')
-rw-r--r--lua/alpha/dap/configs/dart.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/lua/alpha/dap/configs/dart.lua b/lua/alpha/dap/configs/dart.lua
new file mode 100644
index 0000000..cdb7a47
--- /dev/null
+++ b/lua/alpha/dap/configs/dart.lua
@@ -0,0 +1,32 @@
+local dap = require('dap')
+
+dap.adapters.dart = {
+ type = "executable",
+ -- As of this writing, this functionality is open for review in https://github.com/flutter/flutter/pull/91802
+ command = "flutter",
+ args = {"debug_adapter"}
+}
+dap.configurations.dart = {
+ {
+ name = "Launch Flutter Program Linux",
+ type = "dart",
+ request = "launch",
+ -- The nvim-dap plugin populates this variable with the filename of the current buffer
+ program = "${file}",
+ -- The nvim-dap plugin populates this variable with the editor's current working directory
+ cwd = "${workspaceFolder}",
+ -- This gets forwarded to the Flutter CLI tool, substitute `linux` for whatever device you wish to launch
+ toolArgs = {"-d", "linux"}
+ },
+ {
+ name = "Launch Flutter Program Motorola",
+ type = "dart",
+ request = "launch",
+ -- The nvim-dap plugin populates this variable with the filename of the current buffer
+ program = "${file}",
+ -- The nvim-dap plugin populates this variable with the editor's current working directory
+ cwd = "${workspaceFolder}",
+ -- This gets forwarded to the Flutter CLI tool, substitute `linux` for whatever device you wish to launch
+ toolArgs = {"-d", "192.168.0.15:5555"}
+ }
+}