Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA messing with clang-format

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Z01 Posted - May 08 2019 : 05:01:46 AM
Hi,
before installing VA I had CMake project with clang config file in root and had VS set up to use clang-format. It worked fine(ctrl + k + f).

After installing VA now when I press same keys formatting is messed up(it indents namespaces although my clang format file says no). I would guess that you call built in VS formatting instead of accounting for possibility of that user wants clang format, but I am not familiar with your SW so this is just a guess.

Unfortunately I can not give you example solution since it is work project, but if you have some logging mode for VA I am happy to turn it on.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 08 2019 : 11:42:43 AM
Thank you for the update, and checking this added another bit of clang formatting to my basic clang format tests, so not all is lost

Installing VA should not have effected this IDE setting, so I am not sure what happened here. Please let me know if you run into any more odd problems.
Z01 Posted - May 08 2019 : 10:40:33 AM
quote:
Originally posted by feline

Which IDE and version of VA are you using?

I have just set up a test here, using VS2017 and VA 2333.0. I have two different clang format files at work, one in a subdirectory, so it overrides the parent one. Using these two files I have set the formatting rules:

NamespaceIndentation: All

NamespaceIndentation: Inner

when I select the namespace code and use Ctrl+K, Ctrl+F the namespaces are formatted correctly. Am I testing the same IDE and version of VA as you? Are you using this formatting rule, or a different one? If a different one, which one?


Hi it looks it was my mistake, or much less likely that VA install changed options(so I suggest you do not investigate this further unless somebody comes with same problem).
Basically I now noticed that EnableClangFormat support in VS was unchecked.
I do not know how that happened, I remember formatting going bad first after VA install before I started to play with VS options, but it could be I am misremembering things.

VS has very ugly options where it did not grey out other clang format options so it was not obvious to me that it got disabled.

My apologies for wasting your time, but at least now I can tell my coworkers that do not use VA how good support is.
Thank you.
feline Posted - May 08 2019 : 09:21:52 AM
Which IDE and version of VA are you using?

I have just set up a test here, using VS2017 and VA 2333.0. I have two different clang format files at work, one in a subdirectory, so it overrides the parent one. Using these two files I have set the formatting rules:

NamespaceIndentation: All

NamespaceIndentation: Inner

when I select the namespace code and use Ctrl+K, Ctrl+F the namespaces are formatted correctly. Am I testing the same IDE and version of VA as you? Are you using this formatting rule, or a different one? If a different one, which one?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000