monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

Example to load a `basic-language`

Open nichita-pasecinic opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. I went thru the docs and already spend peaty much time and failed to get it working with react, vitejs, monaco-editor and a basic language

Describe the solution you'd like I'd like a example of loading some custom workers and support for basic-language

I'm using the <Editor> component with language='pgsql' (which is a basic language), I can see that it's data is imported directly from CDN, but there is still no autocomplete for default pgsql keywords.

I'd appreciate any hint!

nichita-pasecinic avatar Oct 14 '22 17:10 nichita-pasecinic

@nichita-pasecinic there is no IntelliSense for pgsql. Please read this (the second paragraph - about two groups of supported languages)

suren-atoyan avatar Oct 17 '22 10:10 suren-atoyan

Hi @suren-atoyan, I've read it and understood that there is no rich support out of the box for most of the languages, but still I'd want to see of how to configure or include some IntelliSense support for languages that are different from

this list
TypeScript
JavaScript
CSS
LESS
SCSS
JSON
HTML

within the monaco-react library, what is the right approach of how to include a service worker for an different language / add keyword intelisense / etc.

Thanks!

nichita-pasecinic avatar Oct 17 '22 10:10 nichita-pasecinic

@nichita-pasecinic you can use registerCompletionItemProvider method. Here is an example.

suren-atoyan avatar Nov 06 '22 18:11 suren-atoyan