Skip to content
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

feat: use build flags for delve in dap-go config #178

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

fredrikaverpil
Copy link
Owner

@fredrikaverpil fredrikaverpil commented Sep 7, 2024

Why?

Build tags are not propagated to the internal dap-go config.

What?

This adds support for passing build flags to delve:

return {
  {
    "nvim-neotest/neotest",
    config = function()
      require("neotest").setup({
        adapters = {
          require("neotest-golang")({
            go_test_args = { "-count=1", "-tags=integration" },
            go_list_args = { "-tags=integration" },
            dap_go_opts = {
              delve = {
                build_flags = { "-tags=integration" },
              },
            },
          }),
        },
      })
    end,
  },
}
  • When constructing the internal dap-go launch configuration, check if
    delve.build_flags was provided in neotest-golang opts.
  • Update docs with example.

@fredrikaverpil fredrikaverpil marked this pull request as ready for review September 8, 2024 10:27
@fredrikaverpil fredrikaverpil merged commit 71f7151 into main Sep 8, 2024
8 of 9 checks passed
@fredrikaverpil fredrikaverpil deleted the dap-build-flags branch September 8, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant