coc-sql
coc-sql copied to clipboard
SQL extension for coc.nvim
coc-sql
SQL extension for coc.nvim
Features
- Format by sql-formatter
- Lint by node-sql-parser
Install
:CocInstall coc-sql
Commands
sql.Formatfor current file
Configuration
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 toguesssql.formatOptions: Format options passed tosql-formatter, checkout https://github.com/zeroturnaround/sql-formatter
Usage
Format document
:call CocAction('format'):CocCommand sql.Format
Format selected content
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
License
MIT