flowbased / fbp

FBP flow definition language parser
113 stars 19 forks source link

Syntax highlighting in editors ? #3

Open DjebbZ opened 10 years ago

DjebbZ commented 10 years ago

May not be the best palce to ask, but do you guys have syntax highlighting of fbp files in your favorite editors ? I'm using Sublime Text (2/3) and couldn't find an official fbp syntax highlighter. Would make life easier (although it's not top-priority and could be something made by the community).

d4tocchini commented 10 years ago

@bergie, who was it that made progress with this?

bergie commented 10 years ago

Here is a vim FBP highlighter: https://github.com/ninegrid/vim-fbp

In action:

screenshot 2014-01-02 at 21 52 36

paulyoung commented 10 years ago

I started on a syntax definition last night. It's a .tmLanguage so it should work with TextMate, Sublime, and Atom.

I'm putting some finishing touches to it and then going to figure out how to package it up.

Some screenshots from Sublime Text with the Tomorrow Night Eighties theme:

screen shot 2014-05-14 at 12 05 00

screen shot 2014-05-14 at 12 05 18

screen shot 2014-05-14 at 12 05 31

screen shot 2014-05-14 at 12 05 53

screen shot 2014-05-14 at 12 14 09

paulyoung commented 10 years ago

The current version is slightly different to the above screenshots and also has support for exporting ports (including legacy exports).

For reference:

For anyone looking at the source code - the tmLanguage format is pretty cryptic, and isn't as sophisticated as something like PEG.js, so there's likely a better way to achieve what I've done so far. That said, it should work as expected.

If anyone has feedback or runs into problems, please create an issue for the .tmbundle since that's the source for everything else.

bergie commented 6 years ago

FBP syntax highlighting rules for the ACE editor: https://github.com/johnrees/visualize/blob/37692009de167ca2b9864ca39d3d0a9ee12da6e5/browser/mode-fbp.js