Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get current cmake args in neovim's lua? #203

Closed
Gerodote opened this issue Mar 21, 2024 · 3 comments
Closed

How to get current cmake args in neovim's lua? #203

Gerodote opened this issue Mar 21, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Gerodote
Copy link

Describe the problem or limitation you are having

I try to use new feature of cmake: debugger of CMakeLists.txt .

I got it working somehow: here's the problem line

As you can see, it adds some params like --log-level DEBUG and so on.

The problem is next: I genuinely don't know how to get cmake args cmake-tools.nvim adds to cmake generate command. That's why I wrote some stuff there, and I don't know how to give it args from :CMakeSettings -> return -> generate_options.
I see this doc and maybe there's no such "getter" function.

Describe the solution you'd like

  • a. Explain how to get it in lua, because I'm really new to writing something by myself using lua
  • b. Add a getter for this or for some or for all relevant values from :CMakeSettings

Describe alternatives you've considered

Right now live with default generate options that are there.

Additional context

@Gerodote Gerodote added the enhancement New feature or request label Mar 21, 2024
@Civitasv
Copy link
Owner

Civitasv commented May 3, 2024

You can use cmake.get_generate_options() to get the generate options.

@Gerodote
Copy link
Author

Yep, it works! Thanks.

Could you add this somewhere to docs, please?

@Civitasv
Copy link
Owner

Civitasv commented Jun 8, 2024

Added. See howto.

@Civitasv Civitasv closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants