Skip to content

Commit

Permalink
Setup dap-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Dec 1, 2024
1 parent dcf040f commit 733d44d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ advice for `require-package', to which ARGS are passed."
consult-flyspell ; Flyspell integration with `consult'
consult-lsp ; `lsp-mode' and `consult' helping each other
csv-mode ; CSV file editing mode
dap-mode ; Debug Adapter Protocol support
embark ; Contextual actions in buffers
embark-consult ; Embark integration with `consult'
envrc ; Environment variable manager for shell
Expand Down Expand Up @@ -2627,6 +2628,13 @@ buffers to include `company-capf' (with optional yasnippet) and
;; Enable `which-key-mode' integration for LSP.
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration))


;;;; Debuggin with dap-mode

(require 'dap-mode)

(setopt dap-auto-configure-mode t)


;;;; Language Support
;;;;; Language grammars
Expand Down Expand Up @@ -2824,11 +2832,19 @@ buffers to include `company-capf' (with optional yasnippet) and

;; Enable LSP support in Python buffers.
(require 'lsp-pyright)
(lsp))
(lsp-deferred)

(dap-mode 1))

;; Configure hooks after `python-mode' is loaded.
(with-eval-after-load 'python
(add-hook 'python-mode-hook #'my|setup-python-environment))
(add-hook 'python-mode-hook #'my|setup-python-environment)

(require 'dap-python)
;; ptvsd is depracated, and as of 8/10/2022, ptvsd caused dap to break
;; when it hits a breakpoint. This comment and issue has context:
;; https://github.com/emacs-lsp/dap-mode/issues/625#issuecomment-1128961454
(setopt dap-python-debugger 'debugpy))

;;;;; Lisp and company
;; Associate `cask-mode' with Cask files.
Expand Down

0 comments on commit 733d44d

Please sign in to comment.