protorepl

jasongilman 2016-07-11T00:51:24.000031Z

@carocad: Proto REPL doesn't use the Atom Ink console but it would be an interesting experiment to try it. You could take a look at the Julia client to see how it's used https://github.com/JunoLab/atom-julia-client/blob/master/lib/runtime/console.coffee

jasongilman 2016-07-11T00:54:56.000033Z

I have a feeling you might be thinking of putting the icon in the existing REPL output of Proto REPL. It would be useful to have an icon there next to specific lines to indicate if it's standard output or the results of execution, docs, etc.

jasongilman 2016-07-11T01:02:45.000034Z

You should take a look at https://github.com/jasongilman/proto-repl/blob/master/lib/repl-text-editor.coffee

jasongilman 2016-07-11T01:06:10.000036Z

The appendText function is what you would want to change: https://github.com/jasongilman/proto-repl/blob/master/lib/repl-text-editor.coffee#L194

jasongilman 2016-07-11T01:06:39.000038Z

Every proto repl writes something to the REPL it does it using that method.

jasongilman 2016-07-11T01:13:51.000039Z

You should be able to use the atom decorations API to add a class when text is appended. Each class would add an icon in the gutter. http://blog.atom.io/2014/07/24/decorations.html https://github.com/atom/decoration-example

jasongilman 2016-07-11T01:15:16.000041Z

I think this comment should work to put icons in the gutter https://discuss.atom.io/t/icon-inside-gutter/19514/8

2016-07-11T11:18:23.000043Z

@jasongilman: thanks for the detailed input. I have never programmed in coffescript so this might take a while 😕. BTW, yes I was thinking about putting the icons on the REPL output of Proto-repl. Is there any specific reason why the repl is not modeled as an ink-console but as a special editor pane?

jasongilman 2016-07-11T13:47:19.000044Z

@carocad The only reason is that I started it before I knew about Atom ink. I haven't evaluated whether the console would work well for Proto REPL or not.