Hi, I’ve got a language plugin for a templating language and was thinking about writing an LSP instead. Does anyone have any experience with LSPs that could advise?
It’s basically HTML with language injections: my custom language plus a language provided by the IDE (ruby).
Is this something that works well with LSPs? Can I easily tell the IDE which sections are HTML and Ruby and it will do the highlighting and intelligence for those sections?
Hi, @Simon_Jarrett.oell
I think the best way to do you want is to create a specific plugin with your own rules. It could be like Vue JS plugin, with HTML, CSS, JS in a file.
LSP does not have Language Injection, but you may create Language Service that could trigger Ruby service to interact with your part of Ruby code. It’s necessary, because, I think, Ruby does not understand your custom format file.
Creating IDEA Language Injection isn’t a big deal, just a few lines to make your text in a boundary be any language.