Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA messing with clang-format
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Z01
Junior Member

13 Posts

Posted - May 08 2019 :  05:01:46 AM  Show Profile  Reply with Quote
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.

feline
Whole Tomato Software

United Kingdom
17986 Posts

Posted - May 08 2019 :  09:21:52 AM  Show Profile  Reply with Quote
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?

zen is the art of being at one with the two'ness
Go to Top of Page

Z01
Junior Member

13 Posts

Posted - May 08 2019 :  10:40:33 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17986 Posts

Posted - May 08 2019 :  11:42:43 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2021 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000