diff --git a/emacs/.emacs.d/config/init-ide.el b/emacs/.emacs.d/config/init-ide.el index 2eedc68..794f94c 100644 --- a/emacs/.emacs.d/config/init-ide.el +++ b/emacs/.emacs.d/config/init-ide.el @@ -240,6 +240,33 @@ (eglot-confirm-server-initiated-edits nil) (eglot-connect-timeout nil)) +;; Debug adapter protocol +(use-package dape + :config + (add-to-list 'dape-configs + '(rdbg + modes (ruby-mode ruby-ts-mode) + ensure dape-ensure-command + command "bundle" + command-args ("exec" "rdbg" "-O" "--host" "0.0.0.0" "--port" :autoport "-c" "--" :-c) + fn (lambda (config) + (plist-put config 'command-args + (mapcar (lambda (arg) + (if (eq arg :-c) + (plist-get config '-c) + arg)) + (plist-get config 'command-args)))) + port :autoport + command-cwd dape-command-cwd + :type "Ruby" + ;; -- examples: + ;; rails server + ;; bundle exec ruby foo.rb + ;; bundle exec rake test + -c (lambda () + (format "ruby %s" + (or (dape-buffer-default) "")))))) + ;; Some compilation-mode conveniences (use-package compile :straight (:type built-in)