I'm using atom editor for python with embedded SQL similar to this:
import sqlite3
conn = sqlite3.connect('spider.sqlite')
cur = conn.cursor()
cur.execute('''SELECT COUNT(from_id) AS inbound, old_rank, new_rank, id, url
FROM Pages JOIN Links ON Pages.id = Links.to_id
WHERE html IS NOT NULL
GROUP BY id ORDER BY inbound DESC''')
count = 0
for row in cur :
if count < 50 : print(row)
count = count + 1
print(count, 'rows.')
cur.close()
Any of you who've taken the Coursera python courses will recognize the above code--what's odd is that in the videos, Dr. Chuck's atom environment highlights at least the conventionally capitalized sql keywords such as SELECT, CREATE, FROM, etc. but he never mentions having to do anything to atom to have this happen. What I see in my installation, on the other hand, is that everything within the triple quotes is highlighted as comment text (all green in my theme).
This comment, even though the main thread is referring to MagicPython, (https://github.com/MagicStack/MagicPython/issues/27#issuecomment-418155497) suggests that Atom and SublimeText both support highlighting SQL natively, but even installing the sublime package into Atom does nothing but give me a light "sublimify" sidebar when I just want to keep my native dark UI.
Can anyone point me in the right direction to get triple quoted SQL within python highlighted properly in atom? Thanks!
Edit: I'm running MacOS Sierra (10.12.6) if it matters.