It recreates .pio dir for sure, because when I delete it, init command recreates it.
BTW, there is no info in the command’s help as well:
✗ pio init --help
Usage: pio init [OPTIONS]
-d, --project-dir DIRECTORY
-b, --board ID
-e, --environment TEXT Update existing environment
-O, --project-option TEXT
-h, --help Show this message and exit.
I guess I have an answer to : Running Tools > PlatformIO > Re-Init results in
/usr/local/bin/platformio -c clion init --ide clion
Resolving native dependencies...
Updating metadata for the clion IDE...
Project has been successfully updated!
Process finished with exit code 0
So, I guess those two should be doing exactly the same.
Although… the question would be, what does -c clion change ? BTW, this option is not listed in the pio init --help as well.
This is required when you make some changes and add content that needs to be indexed so that CLION can check the code or be used for search or for jumping. For example, after modifying default_envs, different boards need to load different libraries. Or add lib_deps content, the added library needs to be indexed. Otherwise, clion may mark some code as errors.
Yee, the question is: which changes exactly? So I can automate that?
For example: add a file to src [yes/no], add a file to a “library” (lib subdir) [yes/no], add a new “library” [yes/no], change platformio.ini [here i know the answer: yes], anything else [what? yes/no]
For example, after modifying default_envs , different boards need to load different libraries. Or add lib_deps content, the added library needs to be indexed.
That’s under platformio.ini, so I already know I have to re-init then