> > tm4e and lsp4e follow the same idea than VSCode: > > > > * manage syntax coloration with a textmate grammar. > > * manage completion, hover, etc with LSP > > > > tm4e and lsp4e are 2 distinct projects so you cannot use some information > > coming from lsp4e (some kind of AST) in tm4e. > > I belive it's natural that these two things (heavy weight parsing and > a faster one for coloring) are executed independently. (FreeMarker IDE > does that as well.)
Yes. The benefit to use tm4e si that you can share the work of syntax coloring with textmate and it works with VSCode, WebStorm, Eclipse, Atom, etc > So far so good. But when the heavy weight parser > catches up, it should apply the extra visuals. Many traditional > plugins work like that, I believe (semantic coloring used to lag > behind basic coloring in Eclipse's Java editor for example). > Ok I understand what you mean, for that. Perhaps you could use `textDocument/documentSymbol` https://github.com/Microsoft/language-server-protocol/blob/gh-pages/specification.md > > > > > * for syntax coloration with texmate, you can inject textmate grammar > (ex: > > Freemarker) in an existing textmate grammar (ex: HTML). I have that for > > TypeScript file > > which can contains angular syntax in their @Component/template. > > * for completion, etc (LSP) I think you can apply several language > server > > for the same kind of file. So if you open an HTML file, it could execute > > the existing HTML language server et the Freemarker language server. > > You mean, maybe, the LSP that understand FreeMarker kind of cuts out > the FreeMarker constructs and passed down the now purely HTML content > to the HTML LSP, and then combines the results? > I mean that Freemarker language server manage completion only for Freemarker (not for HTML tag) and when you open an HTML file there will have HTML language server and Freemarker language server which will work together but without having dependency. * the HTML language server will provide completion only for HTML, css and javascript * the Freemarker language server will provide completion only for Freemarker. I think if we have a Freemarker language server, we could consume it in https://github.com/mickaelistria/eclipse-bluesky which provides syntax coloring for HTML, JavaScript, TypeScript, CSS, etc (by using tm4e) and completion for HTML, JavaScript, TypeScript, CSS, etc (by using lsp4e). It will be easy to have a good Freemarker editor (which will support too mix with HTML) if we have a Freemarker language server. > Are the working plugins that actually do this? > > >> > And it could work for other editor which supports LSP like VSCode, > >> > WebStorm, etc > >> > > >> > I think you (the question is who?) should spend your time with LSP > >> > Freemarker Server. It's an hard work but it will work with a lot of > >> > Editor/IDE. > >> > > >> > Regard's Angelo > >> > > >> > 2018-03-07 20:23 GMT+01:00 Taher Alkhateeb < > [email protected]>: > >> > > >> >> Great idea. Love to help if I can > >> >> > >> >> On Mar 7, 2018 7:08 PM, "Daniel Dekany" <[email protected]> wrote: > >> >> > >> >> > The only Eclipse plugin in reasonable state for editing FreeMarker > >> >> > templates is "FreeMarker IDE", which is part of the JBoss Tools > >> >> > project. See the top entry at > >> >> > https://freemarker.apache.org/editors.html, and also > >> >> > https://github.com/jbosstools/jbosstools-freemarker. > >> >> > > >> >> > However, RedHat has deprecated and now removed the "FreeMarker IDE" > >> >> > plugin from JBoss Tools and Devstudio. See: > >> >> > https://stackoverflow.com/questions/49072160/why-is- > >> >> > freemarker-ide-in-eclipse-oxygen-jboss-tools-4-5-2- > final-deprecated > >> >> > https://issues.jboss.org/browse/JBIDE-25736 > >> >> > > >> >> > So I think "FreeMarker IDE" should be brought over to the ASF, > >> >> > similarly as FreeMarker-Online was. Also the Eclipse update "site" > >> >> > should be hosted on ASF infrastructure. I have started a > discussion to > >> >> > explore this possibility, and so far it seems it's fine on their > side: > >> >> > > >> >> > http://lists.jboss.org/pipermail/jbosstools-dev/2018- > >> March/subject.html > >> >> > > >> >> > The code is under EPL, but of course they should "contribute" the > code > >> >> > the ASF where we can replace the license with ASL2, and rename the > >> >> > packages. > >> >> > > >> >> > Technically, "FreeMarker IDE" is independent of the rest of JBoss > >> >> > Tools, we only had to substitute org.jboss.tools:parent (as it's > not > >> >> > in the Maven Central, it's not an acceptable dependency IMO). > >> >> > > >> >> > What do you think? Will the ASF be fine with bringing over yet > another > >> >> > FreeMarker related project? Do you think it's good to do? > >> >> > > >> >> > My opinion is that the more control we have over such products, the > >> >> > easier it is to ensure that they remain maintained and available to > >> >> > the users. > >> >> > > >> >> > -- > >> >> > Thanks, > >> >> > Daniel Dekany > >> >> > > >> >> > > >> >> > >> > >> -- > >> Thanks, > >> Daniel Dekany > >> > >> > > -- > Thanks, > Daniel Dekany > >
