Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add support for DART #6087

Closed
ronag opened this issue Nov 22, 2013 · 26 comments
Closed

Add support for DART #6087

ronag opened this issue Nov 22, 2013 · 26 comments

Comments

@ronag
Copy link

ronag commented Nov 22, 2013

No description provided.

@peterflynn
Copy link
Member

@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?

@ronag
Copy link
Author

ronag commented Nov 23, 2013

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.

@peterflynn
Copy link
Member

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').

@ronag
Copy link
Author

ronag commented Nov 24, 2013

@ronag
Copy link
Author

ronag commented Nov 25, 2013

Also switching to Dartium could be a good idea for better Dart support.

@peterflynn
Copy link
Member

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?

@ronag
Copy link
Author

ronag commented Nov 26, 2013

"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."

@ronag
Copy link
Author

ronag commented Nov 26, 2013

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.

@peterflynn
Copy link
Member

@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.

@ronag
Copy link
Author

ronag commented Nov 26, 2013

@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)?

@rcolinray
Copy link

@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.

@tomek-he-him
Copy link

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.

@dvorapa
Copy link
Contributor

dvorapa commented Nov 7, 2014

Could I ask, if there is any progress in this issue? Is the Dart highlighter close to its implementation to the Brackets?

@hachre
Copy link

hachre commented Nov 7, 2014

@dvorapa There is a Dart syntax highlighter in the extension menu but I haven't tried it yet.

@dvorapa
Copy link
Contributor

dvorapa commented Nov 7, 2014

I'll do. But anyway, shouldn't it be the default function of the editor instead of an extension?

@dvorapa
Copy link
Contributor

dvorapa commented Nov 7, 2014

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.

@tryagains
Copy link

Hi, It seems the Dart extension is removed from github https://github.com/Arubaruba/Dart-Codemirror
Update needed for Dart 1.8.3 syntax

Dart should have better support! autocompletion and Dartium launcher

@dvorapa
Copy link
Contributor

dvorapa commented Jan 3, 2015

Well, I thought the same about language support, but now I see it is on us. So let's code new extension!

@marcelgerber
Copy link
Contributor

CM now has a Dart mode, so we can include that in Brackets 1.2

@dvorapa
Copy link
Contributor

dvorapa commented Jan 3, 2015

Really? That's great!

@marcelgerber
Copy link
Contributor

Yeah, you can have a look at the CM Dart demo already.
Notice though it's only syntax-highlighting; code hints and so on still have to be done by an extension.

But I don't see anything preventing us from having a Dart mode in Brackets 1.2

@dvorapa
Copy link
Contributor

dvorapa commented Jan 4, 2015

Highlighting was the main problem, code hints, analyzer (linter) or live preview (in dartium) are not so important at the moment

@tryagains
Copy link

Can live preview in dartium be done via extension?

@redmunds
Copy link
Contributor

redmunds commented Jan 4, 2015

@tryagains

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.

@dvorapa
Copy link
Contributor

dvorapa commented Jan 4, 2015

I haven't known about the Live Preview MultiBrowser feature. But it works as expected...

@marcelgerber
Copy link
Contributor

FYI, Dart mode will be in Brackets 1.2 (and this issue can probably be closed now).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants