-
Notifications
You must be signed in to change notification settings - Fork 27
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
[Qute] Add language support for qute #178
Comments
@maxandersen do you know if anyone worked on a Textmate grammar for qute already? |
If no textmate grammar is available, then we should start with an existing grammar close to qute, as to minimize our efforts |
I love this challenge, but it's an hard and long issue (developping a tolerant qute parser, etc). Why Quarkus doesn't use Freemarker or Velocity library? Do you know if there are a lot of users who use this qute framework, since today website are done more on client side than server side? |
There isn't one afaik. It's very similar to other similar template languages so should be possible to start with one and adjust. |
Looks like, by default qute templates have the .html extension, so, assuming we come up with a grammar template, users would need to manually select the file type when opening those files. |
Because velocity and freemarker relies on reflection and thus won't work well in native mode. Furthermore qute is reactive plus have optional type checking meaning it can scale better and we can have build time syntax and type checks. There was no other alternative that did all these hence QUarkus TEmplates created.
Templates are not only for website Uis. Also very useful when generating JSON, XML, markdown, asciidoc, emails, etc. |
Not really the default just that the syntax can easily embed. We can
definitely push for suggesting users to add .qute :)
On Mon, 23 Dec 2019 at 16:34, Fred Bricon ***@***.***> wrote:
Looks like, by default qute templates have the .html extension, so,
assuming we come up with a grammar template, users would need to manually
select the file type when opening thoses files.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#178?email_source=notifications&email_token=AAANG4IWW4RY3XTDEWCSEGLQ2DLBDA5CNFSM4J6HH3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHRLLRY#issuecomment-568505799>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAANG4JF6377RFOW36TO3NTQ2DLBDANCNFSM4J6HH3YA>
.
--
/max
https://about.me/maxandersen
|
I meant default as in "per the qute documentation". But we should prolly wait to have a TM grammar before suggesting to use the *.qute extension, else files will really look like shit without |
Thanks a lot @maxandersen for your great explanation! |
Yeah I'm not sure how we actually best handle this in LSPs and grammars as the language is technically simply built into another source language. Possibly for grammars one could have a generic.qute that simply.ignores everything non-qute and then some combined JSON/qute, Html/qute, etc. Grammars which seem to be what some other temate textmate grammars seem to do. For content assist does LSPs support multiple ones for a file ? |
@maxandersen I have some skills about this kind of LSP. Indeed I have started to support Freemarker with LSP in https://github.com/angelozerr/lsp4e-freemarker The basic idea is to have
You can see a demo in this repository with HTML completion (coming from the HTML Language Server of vscode and Freemarker Language Server for validation). Perhaps a good idea is to use those file extension:
|
@maxandersen I have created several issues to support Qute:
|
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer#178 Signed-off-by: azerr <azerr@redhat.com>
Fixes #178 Signed-off-by: azerr <azerr@redhat.com>
Would be great if we could add support for qute template language https://github.com/quarkusio/quarkus/blob/master/docs/src/main/asciidoc/qute-reference.adoc
Mvp would be syntax highlighting similar to how other template languages syntax highlighting works.
Nice to have feature would be LSP support by understanding the inject and parameter declarations and then provide content assist.
Looking into having a preview feature that would use a data yaml for it's rendering would be great. I.e. if you have a mytemplate.qt file then mytemplate.qt.yaml could be used by default to make it super trivial.
The text was updated successfully, but these errors were encountered: