Implementing SQL Autocompletion in Monaco Editor
Recently, I used Monaco editor to implement an SQL editor. To improve the user experience, code auto-completion was necessary. After some research, I found a solution, so I’m marking it down here.
Built-in Autocompletion?
YES, Monaco supports some built-in languages by default, such as JavaScript, TypeScript, CSS, JSON, and HTML
. You can achieve code autocompletion for languages with built-in support simply by setting the editor language to JavaScript`.
However, for languages like SQL that do not have built-in support, setting the editor language to SQL only enables syntax highlighting.