Conversation
Signed-off-by: Eugene San (eugenesan) <eugenesan@gmail.com>
I don't think that QML should be added to the JavaScript syntax. As far as I understand, QML files can contain JavaScript, but the opposite is not true: QML is not valid JavaScript. However, I think that you can include other syntax files in your syntax. So if the overlap is extremely high, you might have luck organizing the files in such a way that a common section is included in both, or one is included in another. |
I agree.
I tried "concatenation" using double include in Syntax and including from inside .syntax and this approach didn't work ( Seems like unless someone reworks syntax loading in editor we'll have to deal with duplication across syntax files. |
Yes, but can't you split it into 3 files like |
|
preferably, js-common.syntax. there shouldn't be anything qml-specific in it. more broadly, #2931 seems relevant once again. if only because dedicated highlighter libraries usually come with a sizable collection of syntax definitions. |
|
Unfortunately (unless I am missing something), it won't be possible to use common syntax file unless we want to cram "default context" of JS related languages into common and have them all use it. |
Proposed changes
Checklist
git commit --amend -smake indent && make check)Discussion
Currently QML was added as a standalone syntax file.
I'd like to hear opinions if instead it should be added to existing JavaScript syntax (
js.syntax) as they share ~70% of syntax and QML can contains JavaScript code.