neovim-cmake icon indicating copy to clipboard operation
neovim-cmake copied to clipboard

Support for setting environment variables during launch/debug

Open AlexAUT opened this issue 2 years ago • 3 comments

Describe the problem or limitation you are having We use environment variables for specific debug switches which we cannot set yet. A workaround is to start the neovim session with them already set.

Describe the solution you'd like Similar interface to args would probably ok because the dap support the env key.

Describe alternatives you've considered Starting neovim with the env set which isn't flexible enough

Additional context I may be able to provide a pull request but I need to get comfortable with lua / nvim scripting first.

AlexAUT avatar Mar 25 '22 11:03 AlexAUT

You could achieve this with presets https://github.com/Shatur/neovim-cmake/issues/32.

shrkamat avatar Apr 26 '22 21:04 shrkamat

I think they do only provide env-variables for the build process, or would this extension pass them to the debugger as well?

I would only need them for launching the application. With different presents it would probably rebuild the application which is not necessary for my usecase.

I can provide a pull request if it is ok for you to have a similar interface as the args/set_target_args for launching an application.

AlexAUT avatar May 04 '22 07:05 AlexAUT

I can provide a pull request if it is ok for you to have a similar interface as the args/set_target_args for launching an application.

Feel free to send a PR.

Shatur avatar May 04 '22 08:05 Shatur