LaurentTreguier / vscode-uncrustify

Code format using uncrustify
66 stars 10 forks source link

Format Option Not Available (C#) #3

Closed mindgrub-rkoch closed 7 years ago

mindgrub-rkoch commented 7 years ago

OS Version: MacOS Sierra 10.12 VSCode Version: 1.6.1 Uncrustify Version: 0.63

Issue: I've followed the instructions in the Readme, installed Uncrustify view Homebrew, and set the paths in settings.json to the default Homebrew installation locations:

"uncrustify.executablePath": "/usr/local/Cellar/uncrustify/0.63/bin/uncrustify" and "uncrustify.configPath": "/usr/local/Cellar/uncrustify/0.63/default_config.cfg"

(I tried a .txt extension as well and that didn't work).

and the format option is not available in my C# file (I'm not sure if this extends to other file formats). I've also tried setting the uncrustify executable in my $PATH, but that did not work either.

LaurentTreguier commented 7 years ago

This should be fixed now. Can you try the newest version and see if it's working ?

mindgrub-rkoch commented 7 years ago

Thanks for the quick response. The format option is indeed showing up, but I am now having an issue where selecting format doesn't do anything.

For reference, this is the default_config.cfg file I am using -> default.cfg

LaurentTreguier commented 7 years ago

I can't seem to reproduce this... Have you correctly set the configuration file path ? Setting it incorrectly makes the extension stop formatting without any kind of warning or error.

mindgrub-rkoch commented 7 years ago

Ah. I see the problem.

Running uncrustify from the command line with the default cfg file yields a bunch of unknown symbol errors. I think that is causing uncrustify to have some issues.

I modified the cfg file and all is good now.

Thanks for looking into this for me.

LaurentTreguier commented 7 years ago

You're welcome !