slynch8 / 10x

10x IDE/Editor
189 stars 34 forks source link

Spaces around template declaration #2049

Open yesitsfebreeze opened 1 year ago

yesitsfebreeze commented 1 year ago

I made a little auto format on safe python script. And realized that template declarations always get a space around it (except if the type is included in the current file) std::vector < std::string > <- spaces around tempalte If i have included in my hpp and declare it in the cpp, the above happens. If i would include it in the cpp aswell, it would be std::vector<std::string>.

krupitskas commented 5 months ago

+1

slynch8 commented 5 months ago

As long as is included somewhere (cpp or hpp) it should format correctly. The file needs to be included to be parsed. Try doing a ReparseAll command (ctrl+shift+X -> ReparseAll) after adding the include and wait for the parse to finish.

slynch8 commented 5 months ago

Is this what you mean? It's not adding spaces for me.

image

krupitskas commented 5 months ago

Ah right, thanks. Yes I have next situation for example. 10x can't find ComPtr without namespace correctly and gives this output image but if I add correct namespace image Formatter catch it up correctly, thanks!