freemarker-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angelo zerr <angelo.z...@gmail.com>
Subject What about Freemarker Language Server (LSP)?
Date Mon, 19 Feb 2018 10:42:41 GMT
Hi,

I tell me if Freemarker could provide a Freemarker Language Server.

Today the main IDE (Eclipse, intellij, etc) , Editors code (VSCode, Atom,
Sublime, Vim,etc) provides a LSP support
https://microsoft.github.io/language-server-protocol/specification to
manage completion, hover, hyperlink, etc in their editor for any language
(HTML, JSON, Java, TypeScript, JavaSCript, CSS, etc) which provides a the
language server.

I think it should really fantastic if Freemarker could provide this same
feature with a "Freemarker Language Server" like JDT Java does it
https://github.com/eclipse/eclipse.jdt.ls

The Freemarker Language Server could maintain FTL files of the project in
memory in  Template structure which can be updated with a none valid FTL
content (when user change the content of the editor).

But today we cannot use the Template structure for the  Freemarker Language
Server, because:

 * the FMParser is not tolerant. So if you try to parse a FTL content which
is not valid (ex : a <#if which is not closed), the parser throws an error.
 * the Template structure cannot be updated with a "replaced content". It's
not a blocking issue since LSP support "incremental", and "full" kind
(see TextDocumentSyncKind at
https://microsoft.github.io/language-server-protocol/specification)

Regard's Angelo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message