Skip to content
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

Closed
maxandersen opened this issue Dec 21, 2019 · 12 comments · Fixed by #412
Closed

[Qute] Add language support for qute #178

maxandersen opened this issue Dec 21, 2019 · 12 comments · Fixed by #412
Assignees
Labels
Milestone

Comments

@maxandersen
Copy link
Collaborator

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.

@maxandersen maxandersen changed the title Add syntax highlighting support for qute Add language support for qute Dec 21, 2019
@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

@maxandersen do you know if anyone worked on a Textmate grammar for qute already?

@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

If no textmate grammar is available, then we should start with an existing grammar close to qute, as to minimize our efforts

@angelozerr
Copy link
Contributor

angelozerr commented Dec 23, 2019

Nice to have feature would be LSP support by understanding the inject and parameter declarations and then provide content assist.

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?

@maxandersen
Copy link
Collaborator Author

@maxandersen do you know if anyone worked on a Textmate grammar for qute already?

There isn't one afaik. It's very similar to other similar template languages so should be possible to start with one and adjust.

@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

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.

@maxandersen
Copy link
Collaborator Author

Why Quarkus doesn't use Freemarker or Velocity library? Do you know if there are a lot of users who use this qute framework,

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.

since today website are done more on client side than server side?

Templates are not only for website Uis.

Also very useful when generating JSON, XML, markdown, asciidoc, emails, etc.

@maxandersen
Copy link
Collaborator Author

maxandersen commented Dec 23, 2019 via email

@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

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

@angelozerr
Copy link
Contributor

Also very useful when generating JSON, XML, markdown, asciidoc, emails, etc.

Thanks a lot @maxandersen for your great explanation!

@maxandersen
Copy link
Collaborator Author

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

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 ?

@angelozerr
Copy link
Contributor

@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:

  • *.html.qute (or if it doesn't work .htmlQute)
  • *.json.qute (or if it doesn't work .jsonQute)

@angelozerr angelozerr changed the title Add language support for qute [Qute] Add language support for qute Jan 3, 2020
@angelozerr angelozerr added the qute label Jan 3, 2020
@angelozerr
Copy link
Contributor

@maxandersen I have created several issues to support Qute:

@angelozerr angelozerr self-assigned this Nov 10, 2021
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 11, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 15, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 18, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 19, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 21, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 22, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 23, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 24, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 24, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/vscode-quarkus that referenced this issue Nov 24, 2021
Fixes redhat-developer#178

Signed-off-by: azerr <azerr@redhat.com>
fbricon pushed a commit that referenced this issue Nov 24, 2021
Fixes #178

Signed-off-by: azerr <azerr@redhat.com>
@rgrunber rgrunber added this to the 1.9.1 milestone Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants