Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Atom integration? #2

Open
chrisgervang opened this issue Nov 14, 2014 · 1 comment
Open

Github Atom integration? #2

chrisgervang opened this issue Nov 14, 2014 · 1 comment

Comments

@chrisgervang
Copy link

Hey guys! Chris from CodeDay here. I want to use this everyday when I'm coding (so does anyone else I talk to!)

I was wondering what you think would be required in order to get this to work in Github's Atom text editor. I've become quite fond of it and have moved away from Sublime. I'm really interested in building the Atom plugin if that's alright with you guys!

@jakeaglass
Copy link
Owner

Awesome! We're happy to have you on-board. The basic components of the system:

codini/codiniServer.py is the Sublime plugin written in Python--you'll probably need to implement a similar package in JS for Atom. It opens a UDP connection on port 8888 to 0.0.0.0 and sends the following data over UDP:

jsonData = {}
        jsonData['syntax'] = view.scope_name(point) #Syntax programmer is using now
        jsonData['word'] = word #Current word being typed
        jsonData['firstLine'] = firstLine #I don't think this is necessary under the new design

Since the internal UDP program to bounce the json from python to node.js is slightly hacky, we're looking to move away from that once we figure out an alternative.

The node-utilising JS file at codini/broadcastServer/broadcastServer.js receives this JSON array and parses it then searches through the imported HTML, CSS, JS, and Python token files to get a list of code suggestions (a to-do item is to add more docsets and reformat our existing ones for convenience--the full documentation pages are hosted on a remote server which are loaded by the client in the webapp), then broadcasts them over a Websocket on 8080.

In short: Python [Sublime Text Plugin] -> (JSON over UDP) -> Node.js [parses documentation] -> (JSON over WS) -> All connected clients [Frontend (index.html, codini.zarv.tk)]

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

No branches or pull requests

2 participants