Open mikevercoelen opened 2 years ago
As far as I understand the monarch tokenization you've created is only used for syntax highlighting. What you are asking for is auto completion / IntelliSense, which is an entirely separate process to integrate. See https://code.visualstudio.com/docs/editor/intellisense and https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.CompletionItemProvider.html
Feel free to create a PR to add your grammar definition! Please don't forget to add some tests. Thanks!
Context
Description
First, I'm insanely grateful for this project, so thanks to all the maintainers.
I've setup highlighting for the OpenGL / GLSL language (see code below).
I do have a few quirks I want to figure out, namely if the user defines a custom function like so:
Imagine the user is typing
my_func
the language doesn't know how to pre-fill it, I tried to look at other language definitions but was struggling with the docs.An image says a thousand words? This is essentially what I want to setup "language awareness" (no idea how to describe it)
The definition is below, happy to make a PR when this is solid, so it can help other people.
Thanks