Shatur / neovim-cmake

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

'run_dir' is not actually missing by default #51

Closed Natr1x closed 2 years ago

Natr1x commented 2 years ago

Bug description "run_dir" in the default jsonparameters_filecreated for every project is not missing but instead set to an empty string. I am a bit unsure if this is actually a bug or the intended behaviour but either way it's annoying since some adapters will not start ifcwd` is empty.

Steps to reproduce

  1. Create and configure a new cmake project
  2. See that the created json file contains "run_dir": ""

You can also run :lua local target_dir, target, target_args = require('cmake.project_config').new():get_current_target() ; print (vim.inspect({ target_dir = target_dir, target = target, target_args = target_args })) inside vim since get_current_target since both run and debug uses get_current_target() to set cwd.

Expected behavior

The README.md currently states that the current target directory should be used if run_dir is missing. But it does not specify if this means an empty string or that the field should not be there to begin with.