Shatur / neovim-cmake

CMake integration for Neovim
GNU General Public License v3.0
87 stars 19 forks source link

Support for setting environment variables during launch/debug #30

Open AlexAUT opened 2 years ago

AlexAUT commented 2 years ago

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.

shrkamat commented 2 years ago

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

AlexAUT commented 2 years ago

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.

Shatur commented 2 years ago

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.