Skip to content

Instantly share code, notes, and snippets.

@Rigellute
Last active December 14, 2018 01:43
Show Gist options
  • Save Rigellute/30ea7cbe2cfcd76c0b88f55b0870872b to your computer and use it in GitHub Desktop.
Save Rigellute/30ea7cbe2cfcd76c0b88f55b0870872b to your computer and use it in GitHub Desktop.
Add syntax highlighting for SQL queries composed in .js files in Atom.

Open preferences in atom and find/install language-babel.

Open the settings of language-babel.

Add /* sql */:source.sql to the Javascript tagged template literal grammer extensions.

Now write your queries like this /* sql */`SELECT * FROM users`. Make sure the query is in backticks `.

Enjoy the pretty queries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment