SQL extension for coc.nvim
- Format by sql-formatter
- Lint by node-sql-parser
:CocInstall coc-sql
sql.Formatfor current file
sql.lintOnOpen: Lint sql file on opening, defaulttruesql.lintOnChange: Lint sql file on change, defaulttruesql.lintOnSave: Lint sql file on save, defaulttruesql.database: Choose the database syntax flavor, default toguess, valid values:db2,hive,mysql,mariadb,bigquery,postgresql,transactsqlsql.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