Open core-ai-bot opened 3 years ago
Comment by busykai Sunday Jan 04, 2015 at 02:16 GMT
@
wcandillon, you need to sign Contributor License Agreement before your contribution can be accepted.
Comment by wcandillon Sunday Jan 04, 2015 at 02:35 GMT
@
busykai did it work? I got the following error: https://www.dropbox.com/s/skc4b4484jqdsuw/Screenshot%202015-01-03%2018.30.27.png?dl=0
Also, the way JSONiq is supported in c9.io and atom.io is by plugin XQLint in the IDE API. For instance: https://atom.io/packages/language-jsoniq Could you point me out how to do it for brackets?
I made a PR for a JSONiq mode in CodeMirror which got closed a bit abruptly: https://github.com/codemirror/CodeMirror/pull/3014
Are you guys happy with CoreMirror? I've been a ACE contributor and now dabbling with Atom and I find CoreMirror a bit too primitive.
Comment by MarcelGerber Sunday Jan 04, 2015 at 16:48 GMT
Yeah, it worked, the build passed now, but the CLA submit page should be fixed nonetheless.
I can understand Marijn, you don't need a linter with an array of 37000 random-looking numbers for the "simple" job of syntax-highlighting. That is, for syntax highlighting (as opposed to linting), there's no need to be aware of every problem in the code.
Take a look at the XQuery mode, too. That's how a normal CM mode looks like. And if JSONiq's syntax is similar to JSON/JSON-LD, you can also extend the JS mode. As you can see, no other mode is based on a linter, and thus the other modes are usually around 300-800 lines.
Comment by redmunds Sunday Jan 04, 2015 at 17:51 GMT
@
wcandillon For modes that are not in core CodeMirror, you can programmatically define them in a Brackets extension. Take a look at the Brackets Apache extension as an example.
Comment by wcandillon Sunday Jan 04, 2015 at 18:08 GMT
Awesome@
redmunds thank you so much for the pointer.
Comment by wcandillon Sunday Jan 04, 2015 at 18:53 GMT
@
redmunds How can you define and import a javascript module in brackets? Adding an npm dependency and using require
doesn't seem to work for bracket extensions.
Comment by MarcelGerber Sunday Jan 04, 2015 at 19:03 GMT
@
wcandillon Just create a new folder in the directory shown after clicking Help > Show Extensions Folder
. The main.js
in that newly created folder is automatically loaded on Brackets startup. You can require Brackets' modules using brackets.getModule()
and require()
your extensions files the normal way.
Notice though that you also need a package.json
for your extension.
Comment by wcandillon Sunday Jan 04, 2015 at 19:21 GMT
@
MarcelGerber It doesn't look that the package.json file of a bracket extension cannot contain dependencies. When I install my extension, the dependencies doesn't seem to be installed. I looked how the jshint extension does it (jshint is committed within the repo). I guess I will try the same.
Comment by MarcelGerber Sunday Jan 04, 2015 at 19:26 GMT
Yeah, dependency management is not something we currently have in Brackets.
You have to at least include the dependency files in the .zip files you submit to the Brackets extension registry later, there's no need to have them in your actual repo (that is, you can .gitignore
them, for example).
Comment by wcandillon Sunday Jan 04, 2015 at 19:42 GMT
@
MarcelGerber do you have a plugin example I could look at? require
doesn't seem to work for me.
Comment by MarcelGerber Sunday Jan 04, 2015 at 19:46 GMT
You can look at this, for example: https://github.com/adobe/brackets/blob/master/src/extensions/default/WebPlatformDocs/main.js#L39
Btw, you might get faster support on IRC: Freenode.net/#brackets
Comment by ficristo Tuesday Aug 09, 2016 at 12:39 GMT
@
wcandillon thank you for your contribution.
As of now we don't accept new languages.
Issue by wcandillon Friday Jan 02, 2015 at 08:04 GMT Originally opened as https://github.com/adobe/brackets/pull/10300
wcandillon included the following code: https://github.com/adobe/brackets/pull/10300/commits