Shatur / neovim-cmake

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

Provide a suitable command to run `cmake --install [build_dir]` within neovim #24

Open krishnakumarg1984 opened 2 years ago

krishnakumarg1984 commented 2 years ago

Describe the problem Modern CMake (3.15+) supports the cmake --install [build_dir] command (invoked on the command line from the project root). Currently, this plugin lacks a neovim command to run the install command.

Describe the solution you'd like Would like to have a install subcommand i.e. :CMake install within Neovim.

Describe alternatives you've considered Using the built-in neovim terminal just for this command.

Additional context Reference link for the install command:

Shatur commented 2 years ago

But why you may want to install something from Neovim? I usually you doing it from terminal.

javster101 commented 2 years ago

This isn't referring to installing a package, this is referring to the install command used to move built targets into some distribution location (cmake --install): https://cmake.org/cmake/help/book/mastering-cmake/chapter/Install.html

Shatur commented 2 years ago

this is referring to the install command used to move built targets into some distribution location

Yes, I'm aware. Just wondering why someone may need it?

krishnakumarg1984 commented 2 years ago

It is a usual requirement to stay within the editor during development. If the install command ephemerally adds to PATH, a simple CLI-based dummy code for testing, then it is really desirable to stay within neovim to iterate on the behaviour of the final installed text-based application.

Second good reason is for completeness, cmake facilities a full suite of c++development which includes the build & test phases, as well as packaging and dashboard visualisation.

It would be helpful to have this feature within this plugin.

Shatur commented 2 years ago

Okay! Feel free to send a PR for it, I will be happy to accept it.