Repository navigation
Allow registering additional CodeMirror languages in CodeEditor #20993
MoatasemGamal
started this conversation in
Ideas
Replies: 2 comments 1 reply
0 replies
|
Thanks, Dan! Really appreciate the quick response and implementation. This is exactly what I was looking for, and the lazy-loading approach is a great addition. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I use Filament 5.9.0 to build a server administration panel and would like to highlight Nginx configuration using the existing
CodeEditor.CodeMirror already provides an Nginx parser through
@codemirror/legacy-modes, usable withStreamLanguage.define(nginx).However, Filament’s integration currently restricts languages in two places:
language()accepts only the built-inLanguageenum.Could Filament provide a documented way for applications or plugins to register additional CodeMirror language extensions while retaining the existing editor’s state binding, themes, read-only behavior, and lifecycle handling?
Ideally, additional languages could load only when needed, without bundling every CodeMirror language.
Nginx is my immediate use case, but an extension API would also help applications editing other configuration formats.
If such an API is outside the intended scope, would a contribution adding built-in Nginx support be welcome?
All reactions