Back to Extensions Directory
Read the complete README
coc-sql
Heyward FannSQL extension for coc.nvim
Installation CommandVim prompt
:CocInstall coc-sql
GitHub owner
Heyward FannVersion
v0.15.0npm package
coc-sqlRequirements
coc ^0.0.80
License
MIT
Repository
GitHubnpm latest published 2025-11-25Registry checked 2026-08-23Registry summary
Published Package Summary
coc-sql
SQL extension for coc.nvim
Features
- Format by sql-formatter
- Lint by node-sql-parser
Install
:CocInstall coc-sql
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
- SQL extension for coc.nvim
Activation Events
- onLanguage:sql
Developer Resources
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-sql@0.15.0.
| Command (:CocCommand) | Description |
|---|---|
| sql.Format | Format sql file by sql-formatter |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
sql.databasestring
Define the database to lint
Default: "guess"
Raw JSON Schema
{
"enum": [
"athena",
"bigquery",
"db2",
"flinksql",
"hive",
"mysql",
"mariadb",
"postgresql",
"redshift",
"snowflake",
"sqlite",
"transactsql"
],
"type": "string",
"default": "guess",
"description": "Define the database to lint"
}sql.lintOnOpenboolean
Lint sql file on opening
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Lint sql file on opening"
}sql.lintOnSaveboolean
Lint sql file on save
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Lint sql file on save"
}sql.lintOnChangeboolean
Lint sql file on change
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Lint sql file on change"
}sql.formatOptionsobject
Format options passed to sql-formatter, check https://github.com/sql-formatter-org/sql-formatter#configuration-options
Default: {}
Raw JSON Schema
{
"type": "object",
"default": {},
"description": "Format options passed to sql-formatter, check https://github.com/sql-formatter-org/sql-formatter#configuration-options"
}