Allow users to pass .env files to debug config #115

Open
theoribeiro wants to merge 10 commits from theoribeiro/main into main
theoribeiro commented 2025-03-06 19:30:49 +03:00 (Migrated from github.com)

This PR adds a feature that has been very useful to me and is available in a very similar way in VSCode.

Description

With the Go plugin in VSCode you can pass an argument called envFile to pass a .env file to delve. The Delve adapter In reality doesn't have this feature, so the extension is reading the .env file and setting up variables to pass as the env argument, which Delve supports.

This PR emulates the same behavior by reading the envFile argument and enriching the env config parameter before passing it on to nvim-dap.

This PR adds a feature that has been very useful to me and is available in a very similar way in VSCode. ## Description With the Go plugin in VSCode you can pass an argument called `envFile` to pass a .env file to delve. The Delve adapter In reality doesn't have this feature, so the extension is reading the .env file and setting up variables to pass as the `env` argument, which Delve supports. This PR emulates the same behavior by reading the `envFile` argument and enriching the `env` config parameter before passing it on to nvim-dap.
dennypenta commented 2025-08-09 23:38:25 +03:00 (Migrated from github.com)

@leoluz does anything block this PR? might remove lots of code from config that everyone adds nowadays to support env files

@leoluz does anything block this PR? might remove lots of code from config that everyone adds nowadays to support env files
Merge branch 'main' into theoribeiro/main
Some checks failed
Lint / Stylua (pull_request) Has been cancelled
Lint / Super Linter (pull_request) Has been cancelled
19d9419c4c
Some checks failed
Lint / Stylua (pull_request) Has been cancelled
Lint / Super Linter (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • lua/dap-go.lua
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin theoribeiro/main:theoribeiro/main
git switch theoribeiro/main

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff theoribeiro/main
git switch theoribeiro/main
git rebase main
git switch main
git merge --ff-only theoribeiro/main
git switch theoribeiro/main
git rebase main
git switch main
git merge --no-ff theoribeiro/main
git switch main
git merge --squash theoribeiro/main
git switch main
git merge --ff-only theoribeiro/main
git switch main
git merge theoribeiro/main
git push origin main
Sign in to join this conversation.
No description provided.