-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add support for DART #6087
Comments
@ronag Would syntax highlighting be enough for your needs? Or are you looking for richer support such as type-aware code hints and Jump to Definition? |
Highlighting would be enough to make brackets usable with Dart. Richer support such as code hints, static analysis. debugging etc... would be even better of course. Would be great to be able to replace dart editor. |
Marked 'move to backlog' -- even highlighting would be nontrivial work since I don't think it's similar enough to other languages to quickly reuse e.g. the "clike" CodeMirror highlighter. This would be a great area for the community to step up and contribute, though (also marking 'Extension Idea'). |
Would the following be useful? https://code.google.com/p/dart/source/browse/experimental/tools/codemirror/?r=3270 |
Also switching to Dartium could be a good idea for better Dart support. |
Ah, interesting: there's a CodeMirror mode (in .js) available here: https://code.google.com/p/dart/source/browse/experimental/tools/codemirror/?r=3270#codemirror%2Fjs%2Fmode%2Fdart. Appears to be MIT-licensed, though its path assumptions would require us patching the file into the CM src tree so it's unfortunately not as easy to integrate as it could be. Seems worth experimenting with if anyone has time. @ronag What do you mean by "switching to Dartium," though? |
"Dartium is a special build of Chromium that includes the Dart VM. Using Dartium means you don't have to compile your code to JavaScript until you're ready to test on other browsers." |
Switching to Dartium might be a bad idea since it expires every month. However, adding support and the possibility to run on Dartium would be very useful. |
@ronag What I was getting at though is what would we switch to Dartium? Do you mean support launching Dartium instead of Chrome when you hit the Live Preview button? Or switching the Brackets shell itself (which is currently Chromium via CEF) to Dartium? If the latter, I'm not sure what it would buy us since Brackets isn't written in Dart... If the former though, that seems reasonable. I'd imagine that would fall under the Live Development with custom Chrome install user story. |
@peterflynn: I am a beginner with both Dart and Brackets. However, my guess would be that if you run the brackets shell itself in Dartium that would possibly enable native debugging of Dart inside of Brackets (without an extra compilation and indirection through dart2js and map files)? |
@peterflynn I've been playing around with integrating the CodeMirror file you linked to as an extension. It works for the most part, although brackets hangs on certain syntax (specifically constructor and function arguments). I am still unfamiliar with the CodeMirror format, so I will update as I learn more. |
A hacky workaround, which works reasonably for now, is to apply javascript highlighting to dart files. You even get qutocompletion to some extent! I've modified the plugin brackets-pjs-syntax-highlighting for this purpose. |
Could I ask, if there is any progress in this issue? Is the Dart highlighter close to its implementation to the Brackets? |
@dvorapa There is a Dart syntax highlighter in the extension menu but I haven't tried it yet. |
I'll do. But anyway, shouldn't it be the default function of the editor instead of an extension? |
It looks like it was assumed from another language highlighter, which's syntax is close, but defferent. It highlights just some of keywords used in Dart. Edit: excuse me if I repeat something. I think, that it was written somewhere before, but I think, that it was just expressed and not discussed more. |
Hi, It seems the Dart extension is removed from github https://github.com/Arubaruba/Dart-Codemirror Dart should have better support! autocompletion and Dartium launcher |
Well, I thought the same about language support, but now I see it is on us. So let's code new extension! |
CM now has a Dart mode, so we can include that in Brackets 1.2 |
Really? That's great! |
Yeah, you can have a look at the CM Dart demo already. But I don't see anything preventing us from having a Dart mode in Brackets 1.2 |
Highlighting was the main problem, code hints, analyzer (linter) or live preview (in dartium) are not so important at the moment |
Can live preview in dartium be done via extension? |
Starting in Brackets 1.1, you can turn on the Live Preview MultiBrowser feature. For details see: https://github.com/adobe/brackets/wiki/Live-Preview-Multibrowser This will start Live Preview in your default browser, and then you can copy/paste url to any other browser. I'm not sure if anyone's tried dartium, so let us know how it goes. |
I haven't known about the Live Preview MultiBrowser feature. But it works as expected... |
FYI, Dart mode will be in Brackets 1.2 (and this issue can probably be closed now). |
No description provided.
The text was updated successfully, but these errors were encountered: