-
Notifications
You must be signed in to change notification settings - Fork 71
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
Unintuitive overwriting of the config options by cached session config #162
Comments
Interesting. I think this might have been the real cause of the problem I was facing with windows in #146. Feel free to create a PR :D |
I understand your concern. Currently, for a new project, it will firstly initialize a session file which include
So to say, it is an indended behaviour, I will highlight it in the config section of README. |
See the latest commit, I've add a description about this behaviour at the Configuration section. |
Closing for now, feel free to open it if you still have this problem. |
Describe the problem or limitation you are having
When modifying config which is supplied to the init.setup function with a new option such as:
require("cmake-tools").setup({ ... cmake_generate_options={ ..., "-DFOO=1"}, ... })
The new option won't be loaded when there already exist a cache for a given project. Seemingly thanks to this line in init.lua:
config.base_settings = vim.tbl_deep_extend("keep", old_config.base_settings, config.base_settings)
This was confusing for a new user (me) and forced me to investigate it in the code.
Describe the solution you'd like
Don't know if it is an intended behavior, if it is really so, then it would be worth mentioning it (highlighted) in the config
section of README.
Describe alternatives you've considered
vim.tbl_deep_extend("force", old_config.base_settings, config.base_settings)
Additional context
The text was updated successfully, but these errors were encountered: