Skip to content

Move solving pyenv path into the template #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dap-python.el
Original file line number Diff line number Diff line change
@@ -180,7 +180,7 @@ as the pyenv version then also return nil. This works around https://github.com/
"Populate CONF with the required arguments."
(let* ((host "localhost")
(debug-port (dap--find-available-port))
(python-executable (dap-python--pyenv-executable-find dap-python-executable))
(python-executable (plist-get conf :python-exec-path))
(python-args (or (plist-get conf :args) ""))
(program (or (plist-get conf :target-module)
(plist-get conf :program)
@@ -237,6 +237,7 @@ as the pyenv version then also return nil. This works around https://github.com/
:module nil
:program nil
:request "launch"
:python-exec-path (dap-python--pyenv-executable-find dap-python-executable)
:name "Python :: Run file (buffer)"))

(dap-register-debug-template "Python :: Run pytest (buffer)"
@@ -246,6 +247,7 @@ as the pyenv version then also return nil. This works around https://github.com/
:program nil
:module "pytest"
:request "launch"
:python-exec-path (dap-python--pyenv-executable-find dap-python-executable)
:name "Python :: Run pytest (buffer)"))

(dap-register-debug-provider "python-test-at-point" 'dap-python--populate-test-at-point)
@@ -254,6 +256,7 @@ as the pyenv version then also return nil. This works around https://github.com/
:args ""
:module "pytest"
:request "launch"
:python-exec-path (dap-python--pyenv-executable-find dap-python-executable)
:name "Python :: Run pytest (at point)"))

(provide 'dap-python)