Skip to content

Rust/Cargo and nvim-dap/codelldb interaction #671

Answered by mfussenegger
DerekSauer asked this question in Q&A
Discussion options

You must be logged in to vote

The ${cargo:program} placeholder is not supported by nvim-dap. It's specific to the vscode extension:

https://github.com/vadimcn/vscode-lldb/blob/bc36db0bafd1b77d1cc9aa2dc9d69b221c7d4ae8/extension/main.ts#L397

Given that nvim-dap aims to be debug-adapter agnostic it's out of scope for the core, but would have to go into an extension

There is currently no first-class extension points specifically to place-holders, but I think it should be possible to use the enrich_config mechanism of the adapter definition to resolve custom placeholders.

Along the lines of:

local function expand_cargo(option)
  if option == "${cargo:program}" then
    -- ...
  end
  return option
end

dap.adapters.codelldb =

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@DerekSauer
Comment options

Answer selected by DerekSauer
Comment options

You must be logged in to vote
1 reply
@mfussenegger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants