Support Kotlin syntax highlighting in file preview
Categories
(DevTools :: Debugger, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: Harald, Unassigned)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
139.75 KB,
image/png
|
Details |
Debugger should support Kotlin as source mapped language and syntax highlight it correctly.
https://kotlinlang.org/docs/tutorials/javascript/kotlin-to-javascript/kotlin-to-javascript.html
Via https://discourse.mozilla.org/t/kotlin-sourcemap-debug-support/40966
Comment 1•6 years ago
|
||
codemirror has a mode for it so we can easily add this
http://lig-coin.imag.fr/COIN3D/ThirdParty/codemirror-4.6/mode/kotlin/index.html
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Hello,
I would like to take a stab at this.
Comment 3•6 years ago
|
||
Go for it
Comment 4•6 years ago
|
||
Hi I would like to start working on it but would need some help as to where to start from
Comment 5•6 years ago
|
||
Here are our codemirror modes
https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/utils/editor/source-editor.js#16
there are some docs in
https://searchfox.org/mozilla-central/source/devtools/client/shared/sourceeditor/README
Comment 6•6 years ago
|
||
Hey Jason. Seems like we already have kotlin mode imported in clike.js
at
https://searchfox.org/mozilla-central/source/devtools/client/shared/sourceeditor/codemirror/mode/clike/clike.js#596
Also the handling of kotlin file type is handled in getMode
method at following line
https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/utils/source.js#367
Can you help me if there is any config file which I am missing out that needs to be modified in order to source map kotlin file?
Comment 7•6 years ago
|
||
Hmm, those things exist, but we're still not seeing the syntax highlighting?
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Syntax highlighting is present but is not as concise as it would be for javascript. I have attached the screenshot of the same.
Comment 10•6 years ago
|
||
That is likely a codemirror issue. I don't know if there is anything we can do from our end.
Description
•