ZenCoding in custom language plugin

Hi, I have a Smarty-like templates format and need to integrate ZenCoding there. How should I do that?
Adding SmartEnterProcessor in plugin.xml results in nothing.

And there's no source code for Smarty plugin available in public to see the implementation.

2 comments
Comment actions Permalink

Hello Valeriy,

SmartEnterProcessor has nothing to do with Zen Coding, and there is no code
related to Zen Coding in the Smarty plugin. To have Zen Coding (and all other
HTML features) work for a template language, you need to implement TemplateLanguageFileViewProvider
for your template language, and to provide multiple PSI trees for a template
file (one for HTML and another for your template language). You can find
an implementation example in the old open-source version of the PHP plugin:
https://idea-php.svn.sourceforge.net/svnroot/idea-php/

Hi, I have a Smarty-like templates format and need to integrate
ZenCoding there. How should I do that?

Adding SmartEnterProcessor in plugin.xml results in nothing.

And there's no source code for Smarty plugin available in public to
see the implementation.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thank you. It's clear to understand how PHP plugin works. But it seems that I have some limitations with my language - it have some stuff mixed with HTML, so it seems that it's impossible for me to set Template Token for something even between html tags:

<html>
<body>
^test[]
$blah[fixme]
^blah.match[me][g]{}
</body>
</html>

I could get html completion to work inside the tags (with attributes) via setting template token tags for < & > in the lexer. But I couldn't do that for between-tags stuff (seems like Zen Coding needs that stuff marked template too to work).

(This is Parser 3 http://www.parser.ru/, which has no strong template/code delimiters like PHP's <? and ?>)




It would be nice to set multiple tokens as the Template Token and share it between custom language and html. Could it be done via standard classes? It seems that I should extend many classes to get this functionality to work.

It also would be nice if there any way of highlighting html first, and then - custom language as the second layer (saw something like LayeredLexer in PHP plugin, but not sure if it's what I was looking for).

Everything works currently on LayeredLexerEditorHighlighter and FileViewProvider pair (with the default language lexer) - only inside tags, without Zen Coding.

0

Please sign in to leave a comment.