Soy editor

1,174 views
Skip to first unread message

Markus

unread,
Jan 27, 2012, 11:30:54 AM1/27/12
to closure-temp...@googlegroups.com
Hi everyone,
is there a tool to write soy file or a plug to format and indent it?
Thx
Markus :-)

Sam Elkhateeb

unread,
Jan 27, 2012, 11:59:19 AM1/27/12
to closure-temp...@googlegroups.com
There is one for emacs that I use (soy-mode). 

here is the github repo for it
--
Thanks
Sam Elkhateeb
NanoSN Cloud Computing Service Inc.

Kai Huang

unread,
Jan 27, 2012, 1:32:23 PM1/27/12
to closure-temp...@googlegroups.com
Here are a few more that I'm aware of:


If people know any other ones, please reply and add it to this thread.

Marco Gadaleta

unread,
Jan 27, 2012, 3:52:23 PM1/27/12
to closure-temp...@googlegroups.com
Ther's nothing for eclipse?
--
dott. Marco Gadaleta
Project & Team Manager
 zerodosrl.gadaleta    (+39) 347 958 11 85    m.gad...@zerodo.it


   ZERODO srl
 p.i/vat IT
07164630720

 sede leg. Via Paganini, 1/A 
 sede op.  Via Della Scaletta, z.i.  
 70020 Cassano Delle Murge (Ba)

  zerodosrl    (+39) 080 948 63 03    www.zerodo.it    in...@zerodo.it    


   Non stampare questa mail se non è strettamente necessario.

Please do not print this email unless you really need to.

Le informazioni contenute in questo messaggio di posta elettronica sono riservate, rivolte esclusivamente al destinatario e non comportano alcun vincolo ne' creano obblighi per la società mittente, salvo che ciò non sia espressamente previsto da un precedente accordo. Ogni altra persona diversa dal destinatario non può copiare o consegnare il presente messaggio o parte dello stesso a terzi ne' trattare in alcun modo i dati contenuti. La informiamo inoltre che l'utilizzo non autorizzato del messaggio o dei suoi allegati potrebbe costituire reato. 

The information in this e-mail are reserved, only addressed to the addressee and they are neither binding on this Society nor to be understood as creating any obligation on its part except where provided for an agreement. Everyone different from the addressee (who received this e-mail) cannot either copy or deliver the message or a part of it in possession of a third party, nor even deal with the information in this e-mail. Furthermore the unauthorized use of this message or any attachment could be an offence.

Michael Bolin

unread,
Jan 27, 2012, 4:06:33 PM1/27/12
to closure-temp...@googlegroups.com, closure-temp...@googlegroups.com
Sadly none that I'm aware of :( It shouldn't be that hard to add one to one of the existing popular colorers, right?

Sent from my iPhone

Andre Tannus

unread,
Jan 27, 2012, 5:56:16 PM1/27/12
to closure-temp...@googlegroups.com

Netbeans supports TPL.

I told Netbeans that .soy files are of TPL mime, so it recognizes the HTML withing them and highlights the {} markup, which is plenty for me.

Perhaps Eclipse can do that too? Didn't try though...


--
--
A ciência consiste em perturbar um sistema e analisar sua reação. Eu, sou uma perturbação.

André Tannús
Chef, Cook, Solution Designer and Developer at Epungo
+55 11 8053-7636

"Somewhere, something incredible is waiting to be known."
Carl Sagan



Andre Tannus

unread,
Jan 27, 2012, 5:57:28 PM1/27/12
to closure-temp...@googlegroups.com
If it helps, tools -> options -> miscellaneous -> Files

then create a "New" File Extension for "soy" and associate it to TPL MIME.

Juan Mendes

unread,
Jan 27, 2012, 5:58:16 PM1/27/12
to closure-temp...@googlegroups.com
I agree with Andre.

I use Intellij, which does have a soy plugin. But I chose not to use it because it does not highlight the HTML, only the soy code. I much prefer to have the HTML highlighted, my soy code is always simple.

Therefore, just setting your IDE to treat is as HTML is good enough for me too
--
Juan Mendes

Siarhei Khilko

unread,
Jan 27, 2012, 1:44:12 PM1/27/12
to closure-temp...@googlegroups.com
Could anyone recommend any good Eclipse plugin?

Johannes Nel

unread,
Jan 27, 2012, 11:33:39 AM1/27/12
to closure-temp...@googlegroups.com
http://plugins.intellij.net/plugin/?idea&id=5830


I used it for a bit, but when I reinstalled never did again. it had some quirks.
--
j:pn
\\no comment

Kai Huang

unread,
Feb 3, 2012, 3:14:37 PM2/3/12
to closure-temp...@googlegroups.com
Sergey: I don't think anyone here has encountered a Soy syntax plugin for Eclipse. Sorry.

Johannes: Maybe try this one: http://plugins.intellij.net/plugin/?idea&id=5043
(I've never used either one, so I'm not guaranteeing it will work well. Just pointing out that there are multiple choices for IntelliJ.)

Edward Venaglia

unread,
Feb 7, 2012, 3:17:21 PM2/7/12
to closure-temp...@googlegroups.com
You should see basic HTML syntax highlighting if you are using the Non-Dairy Soy Plugin. Let me know if you don't.

Juan Mendes

unread,
Feb 8, 2012, 4:33:43 PM2/8/12
to closure-temp...@googlegroups.com
Edward,

Your plugin for intellij works very well. My comment was referring to another plugin I was using. Thanks, I'll be using that from now on.

Here are some possible improvements/suggestions

- code folding (the +- arrow on the left) doesn't work for {if} but it does work for {template}
- code folding doesn't work for html tags
- code completion when starting a soy command:  "{" followed by (ctrl+space) could give you a drop down with template, if, foreach

Thanks a lot,

--Juan

On Tue, Feb 7, 2012 at 12:17 PM, Edward Venaglia <even...@gmail.com> wrote:
You should see basic HTML syntax highlighting if you are using the Non-Dairy Soy Plugin. Let me know if you don't.



--
Juan Mendes

Kai Huang

unread,
Mar 20, 2012, 4:45:37 PM3/20/12
to closure-temp...@googlegroups.com
FYI, I've updated the page at
https://developers.google.com/closure/templates/docs/syntax_highlighting
with info from these threads. There are now syntax highlighters for a few editors.

PS. I didn't write this documentation page initially. You can thank Ed Venaglia for asking me to fix the spelling of his name on the page, thus causing me to look at it and update it.

Mark Nuttall-Smith

unread,
May 16, 2012, 10:40:45 AM5/16/12
to closure-temp...@googlegroups.com
Thanks for the plugin Ed - it's very useful for Intellij users. Just wondering, is there a way to get indentation to work? I had a look through your todo list and couldn't see it there, which makes me think that it's something that should be working already.

Cheers,
Mark

Edward Venaglia

unread,
May 18, 2012, 9:34:32 PM5/18/12
to closure-temp...@googlegroups.com
Indentation is something that's should be on that wish list. I've added it locally, so it will show on my next commit.

The IntelliJ extension point is for Code Formatting, so it's a bit more than just "indentation". Given the mixed nature of closure templates, the code formatter needs to know the structure of both the closure tags AND the free-form template data. This gets really complicated when you consider that the contained template could contain a mix of syntax, not just HTML.

Thanks for using the plugin.

-Ed-
Reply all
Reply to author
Forward
0 new messages