Building a Lit Component for a Language #1080
Replies: 2 comments
-
I'm not sure of the specifics, but I'd suggest these high level steps:
|
Beta Was this translation helpful? Give feedback.
-
Hi @ballcoach12 we are a bit behind with updating langium-website. Draft PR eclipse-langium/langium-website#157 is now available. It makes use of Best starting point is the Langium example here: https://github.com/TypeFox/monaco-components/tree/main/packages/monaco-editor-wrapper#examples. First two steps @trusktr mentioned are basically done in the Langium example. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been working with one of the folks on the
monaco-editor-wrapper
team to try and make this work, but I thought I'd check here as well and see if there are any recommendations.We want to wrap the Monaco editor in a Lit web component that attaches the worker and syntax highlighting files when the element is rendered. We have followed, to some extent, the steps in the documentation (https://langium.org/tutorials/langium_and_monaco/), and want adapt this approach to work with a Lit component. I noticed here (#772) that a similar approach has been taken with React.
Our idea is to build our language project, publish it as an npm module and use its worker bundle to enable the language server to work in the browser. The monaco-editor-wrapper folks recommended using the latest version (2.0.0) of the wrapper, but we can't seem to make that work, and I see that the Langium documentation shows using an earlier version.
Can someone outline the steps that we might be able to follow in getting our language packaged in the manner that I describe?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions