File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,14 @@ Required to support 'Inspect Widget'."
163163 (dap--put-if-absent conf :useFlutterStructuredErrors lsp-dart-dap-flutter-structured-errors)
164164 (lsp-dart-dap--capabilities-debugger-args conf)))
165165
166+ (defun lsp-dart-dap--enable-mode ()
167+ " Enable `lsp-dart-dap-mode' ."
168+ (lsp-dart-dap-mode 1 ))
169+
170+ (defun lsp-dart-dap--disable-mode ()
171+ " Enable `lsp-dart-dap-mode' ."
172+ (lsp-dart-dap-mode -1 ))
173+
166174(lsp-dependency
167175 'dart-debugger
168176 `(:download :url lsp-dart-dap-extension-url
@@ -301,7 +309,7 @@ Call CALLBACK when the device is chosen and started successfully."
301309 :originalUrl url
302310 :exposedUrl url)))
303311
304- (cl-defmethod dap-handle-event ((_event (eql dart.webLaunchUrl)) session params)
312+ (cl-defmethod dap-handle-event ((_event (eql dart.webLaunchUrl)) _session params)
305313 " Open url in browser from SESSION and PARAMS."
306314 (-let (((&hash " launched" " url" ) params))
307315 (unless launched
@@ -436,7 +444,8 @@ Call CALLBACK when the device is chosen and started successfully."
436444 (t
437445 (remove-hook 'after-save-hook #'lsp-dart-dap--on-save ))))
438446
439- (add-hook 'dap-session-created-hook #'lsp-dart-dap-mode )
447+ (add-hook 'dap-session-created-hook #'lsp-dart-dap--enable-mode )
448+ (add-hook 'dap-terminated-hook #'lsp-dart-dap--disable-mode )
440449
441450(provide 'lsp-dart-dap )
442451; ;; lsp-dart-dap.el ends here
You can’t perform that action at this time.
0 commit comments