Skip to content

Commit

Permalink
Support dape
Browse files Browse the repository at this point in the history
  • Loading branch information
wyuenho committed Jul 13, 2024
1 parent bc8dc93 commit 71a1fa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Supported Emacs Packages
- `projectile <https://docs.projectile.mx/projectile/index.html>`_
- `envrc <https://github.com/purcell/envrc>`_ (`direnv caveats`_)
- `eglot <https://github.com/joaotavora/eglot>`_
- `dape <https://github.com/svaante/dape>`_
- `flycheck <https://www.flycheck.org/en/latest/>`_
- `lsp-jedi <https://github.com/fredcamps/lsp-jedi>`_
- `lsp-pyright <https://github.com/emacs-lsp/lsp-pyright>`_
Expand Down
8 changes: 8 additions & 0 deletions pet.el
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,8 @@ FN is `eglot--guess-contact', ARGS is the arguments to
(defvar lsp-ruff-lsp-python-path)
(defvar dap-python-executable)
(defvar dap-variables-project-root-function)
(defvar dape-command)
(defvar dape-cwd-fn)
(defvar python-pytest-executable)
(defvar python-black-command)
(defvar python-isort-command)
Expand Down Expand Up @@ -960,6 +962,8 @@ buffer local values."
(setq-local lsp-ruff-lsp-python-path python-shell-interpreter)
(setq-local dap-python-executable python-shell-interpreter)
(setq-local dap-variables-project-root-function #'pet-virtualenv-root)
(setq-local dape-command `(debugpy-module command ,(pet-executable-find "python")))
(setq-local dape-cwd-fn #'pet-virtualenv-root)
(setq-local python-pytest-executable (pet-executable-find "pytest"))
(setq-local python-black-command (pet-executable-find "black"))
(setq-local python-isort-command (pet-executable-find "isort"))
Expand Down Expand Up @@ -987,6 +991,8 @@ buffer local values."
(kill-local-variable 'lsp-ruff-lsp-python-path)
(kill-local-variable 'dap-python-executable)
(kill-local-variable 'dap-variables-project-root-function)
(kill-local-variable 'dape-command)
(kill-local-variable 'dape-cwd-fn)
(kill-local-variable 'python-pytest-executable)
(kill-local-variable 'python-black-command)
(kill-local-variable 'python-isort-command)
Expand Down Expand Up @@ -1038,6 +1044,8 @@ has assigned to."
lsp-ruff-lsp-python-path
dap-python-executable
dap-variables-project-root-function
dape-command
dape-cwd-fn
python-pytest-executable
python-black-command
blacken-executable
Expand Down

0 comments on commit 71a1fa0

Please sign in to comment.