codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.9k stars 357 forks source link

Disable "Run Visual Studio formatting" only for a certain file type #234

Open monoblaine opened 8 years ago

monoblaine commented 8 years ago

When I save a file, I'd like to have CodeMaid do all the cleanup actions with an exception: If the file is a JavaScript file, do not format the file. I just want to disable the formatting action, but others should remain (It should still add end of file trailing new line, for instance) Is this possible?

codecadwallader commented 8 years ago

No, we don't currently have that level of configuration available. Is there a specific aspect of format document you are trying to avoid or is it a blanket request?

monoblaine commented 8 years ago

Visual Studio removes the space between function name and the parentheses:

function hede () {}

becomes

function hede() {}

And there's no option to disable that.

codecadwallader commented 8 years ago

Understood. It's not complex code to write to add this specific option for your use case, but the difficulty we run into is the complexity of visualizing all of the specific options (and combinations of them) within the Options dialog. We currently have ~140 options and I'm not sure how to add this one cleanly without considering a bit of redesign. I'm open to suggestions.

monoblaine commented 8 years ago

As far as I understand, options that concern files beyond .NET-related ones are:

How about showing a button with a label "Applied To" near all these universal (not .NET specific) options? When clicked, display a form with two radio buttons: