@ivankravets
The problem of using cpp is that the method prototypes are not generated to “tmp_ino_to.cpp” you have to do it in a separated header file or in the beginning of the cpp file. That is standard c/c++ way.
In Arduino way, you only have an ino file and the method prototypes are generated in the compiler.
I have another issue in linter using .ino files
If you call a method before it is declared in the .ino file the code linter reports method not found. That’s obvious because there’s no prototypes or methods loaded before.
May I suggest a temporary fix for that: generate an invisible prototype header file and include in code linter everytime a new method is created. That seems impossible to accomplish because in larger files it will cause lag. Instead everytime the file is build include that invisible file to get rid of linter errors.
I’ve just fixed this bug. Please go to Menu: PlatformIO > Settings > PlatformIO IDE and check “Use development version of PlatformIO”. Then, Menu: PlatformIO > Rebuild C/C++ Project Index.
INO - this is a “crutch”. Don’t use it. the C/C++ Code Completion and Linter work only with VALID C/C++ files. If you still want to use INO files and to have enabled Code Linter, please take a look at this known issue: Smart Code Linter is disabled for Arduino files.