SQL extension for coc.nvim
- Format by sql-formatter
- Lint by node-sql-parser
:CocInstall coc-sql
sql.Format
for current file
sql.lintOnOpen
: Lint sql file on opening, defaulttrue
sql.lintOnChange
: Lint sql file on change, defaulttrue
sql.lintOnSave
: Lint sql file on save, defaulttrue
sql.database
: Choose the database syntax flavor, default toguess
, valid values:db2
,hive
,mysql
,mariadb
,bigquery
,postgresql
,transactsql
sql.formatOptions
: Format options passed tosql-formatter
, checkout https://github.com/zeroturnaround/sql-formatter
:call CocAction('format')
:CocCommand sql.Format
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
MIT