-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when 'beautifying' ascx file #230
Comments
This means that the grammar Atom has detected for your file is 'Web Form/Control (C#)', which is good, however Atom Beautify does not support that grammar. See https://github.com/Glavin001/atom-beautify/blob/master/lib/language-options.coffee#L406-L499
This means Atom did not detect the grammar of your source code file. I think what you're trying to beautify is
Both are simple enough. Option 1 being temporary (you'd have to set the grammar likely when you restart Atom) and option 2 being the best because then Atom Beautify fully supports Hope that helps! |
Could you please provide me with some sample code I can write tests for? Thank you. |
I wish I could give you something as simple as hello world but I’m just the front-end guy. All this dev was done by another guy at our company. So I am integrating my front-end with his development. Here is the code. Sorry it is a huge chunk of mess. Indents should be somewhat recognizable. We are using knockout.js in there as well. That is all the commented stuff but I imagine that wouldn’t effect you since it is probably just recognized as a comment. Code pasted below. 2nd email coming with the actual file. <%@ control language="C#" autoeventwireup="true" CodeFile="Dashboard.ascx.cs" inherits="Dashboard" %>
<%--/foreach: rows--%>
<%--/foreach: tabs--%>
<%----%>
ADD CHART
—— Ed Pirone SharpHat Inc.
|
—— Ed Pirone SharpHat Inc.
|
Sidenote. It is insane how responsive you are to all of this. I’d be happy to donate if you have an option like that. Nothing crazy but I know every dollar helps. —— Ed Pirone SharpHat Inc.
|
That looks sufficiently like HTML, so let's try something:
Let me know how that looks.
Thank you, I appreciate it. I currently do not have any option to donate. Just happy to help my fellow developers 😃. |
Apparently you’re a wizard. Thank you. Send the donation link :) —— Ed Pirone SharpHat Inc.
|
Awesome! Glad it worked out.
Your thanks is all I need 😃. To help others writing ASP.NET Web Form Control code like yourself, I want to officially add support for this fix. Can you confirm that this is the language you installed into Atom? https://github.com/jbalboni/atom-language-aspx I am going to add those grammars such that any future user (including yourself) can continue to use those grammars listed above and it will correctly beautify. |
Yessir. Thats the one. —— Ed Pirone SharpHat Inc.
|
Published to v0.21.6 Please give that a shot (revert your selected Atom grammar back to |
@edpirone I believe that with the latest version (v0.27.4) this may be broken. This is because I forgot to create a new Language and add the grammar
|
Haven't had any issues with it as of yet. |
And you are updated to v27.4? Interesting. Well that's great! I'm still going to revisit this just to make sure that I did not break anything with #282. Thanks! |
Unsupported language for grammar 'Web Form/Control (C#)'.
Im working off of OS X. Installed uncrustify through brew. Set my paths in Beautify to /usr/local/Cellar/uncrustify/0.61/share/uncrustify/ since it didn't look like it installed in the default location of /usr/local/bin/. Instead a shortcut was placed there that lead to the other path.
Now when I try to beautify I get the error listed above. Use to get Unsupported language for grammar 'Null Grammar'.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: