Home

Awesome

Template Literal SQL Highlighting for Vim

This is a Vim plugin that provides highlighting inside SQL template literals when using a module like sql-template-strings. It kind of works.

screenshot

This module is experimental and strongly inspired by vim-graphql.

Installation

Using Plug

  1. Add Plug 'statico/vim-javascript-sql' to ~/.vimrc
  2. vim +PluginInstall +qall

Using Vundle

  1. Add Plugin 'statico/vim-javascript-sql' to ~/.vimrc
  2. vim +PluginInstall +qall

Using Pathogen

  1. cd ~/.vim/bundle
  2. git clone https://github.com/statico/vim-javascript-sql.git

Configuration

This plugin uses the generic SQL syntax by default. If you want to use a different dialect, like PostgreSQL, put something like this in your .vimrc:

let g:javascript_sql_dialect = 'pgsql'