{"id":27969159,"url":"https://github.com/future-architect/vscode-uroborosql-fmt","last_synced_at":"2025-05-07T21:08:45.923Z","repository":{"id":195710977,"uuid":"693493964","full_name":"future-architect/vscode-uroborosql-fmt","owner":"future-architect","description":"uroboroSQL-fmt for VSCode","archived":false,"fork":false,"pushed_at":"2025-02-09T17:03:25.000Z","size":21970,"stargazers_count":7,"open_issues_count":6,"forks_count":0,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-07T21:08:38.030Z","etag":null,"topics":["formatter","sql","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=Future.uroborosql-fmt","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/future-architect.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-19T06:24:47.000Z","updated_at":"2025-02-09T17:02:37.000Z","dependencies_parsed_at":"2024-02-13T02:28:59.594Z","dependency_job_id":"57ef2972-c592-400c-93cd-183a03b4606f","html_url":"https://github.com/future-architect/vscode-uroborosql-fmt","commit_stats":null,"previous_names":["future-architect/vscode-uroborosql-fmt"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fvscode-uroborosql-fmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fvscode-uroborosql-fmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fvscode-uroborosql-fmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fvscode-uroborosql-fmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-architect","download_url":"https://codeload.github.com/future-architect/vscode-uroborosql-fmt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954409,"owners_count":21830905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formatter","sql","vscode-extension"],"created_at":"2025-05-07T21:08:45.303Z","updated_at":"2025-05-07T21:08:45.890Z","avatar_url":"https://github.com/future-architect.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uroboroSQL-fmt for VSCode\n\n![logo](./images/logo.png)\n\n![demo](./images/demo.gif)\n\nA Visual Studio Code extension for [uroboroSQL-fmt](https://github.com/future-architect/uroborosql-fmt) that is a tool that formats SQL statements according to [SQL coding standards created by Future Corporation](https://future-architect.github.io/coding-standards/documents/forSQL/SQL%E3%82%B3%E3%83%BC%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%E8%A6%8F%E7%B4%84%EF%BC%88PostgreSQL%EF%BC%89.html) (Japanese only).\n\n## Usage\n\nOnce installed in Visual Studio Code, \"uroborosql-fmt\" will be available as a formatter for SQL files. Please select \"uroborosql-fmt\" (extension id:`Future.uroborosql-fmt`) as the default formatter. You can do this either by using the context menu (right click on a open SQL file in the editor) and select \"Format Document With...\", or you can add the following to your settings:\n\n```json\n{\n  \"[sql]\": {\n    \"editor.defaultFormatter\": \"Future.uroborosql-fmt\"\n  }\n}\n```\n\n### Format on save\n\nYou can enable format on save for SQL by having the following values in your settings:\n\n```json\n{\n  \"[sql]\": {\n    \"editor.defaultFormatter\": \"Future.uroborosql-fmt\",\n    \"editor.formatOnSave\": true\n  }\n}\n```\n\n## Settings\n\n| Settings                             | Defaults | Description                                                                                                                                                                                                                                                                                               |\n| ------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| uroborosql-fmt.configurationFilePath | null     | The path of configuration file. File extension must be `.json`. If you don't specify the path and `./.uroborosqlfmtrc.json` exists, formatter will use `./.uroborosqlfmtrc.json`. If you doesn't specify and `.uroborosqlfmtrc.json` doesn't exist, formatter will use formatters default configurations. |\n\n### Configuration options\n\n```json\n{\n  \"debug\": false,\n  \"tab_size\": 4,\n  \"complement_alias\": true,\n  \"trim_bind_param\": false,\n  \"keyword_case\": \"preserve\",\n  \"identifier_case\": \"preserve\",\n  \"max_char_per_line\": 50,\n  \"complement_outer_keyword\": true,\n  \"complement_column_as_keyword\": true,\n  \"remove_table_as_keyword\": true,\n  \"remove_redundant_nest\": true,\n  \"complement_sql_id\": true,\n  \"convert_double_colon_cast\": false,\n  \"unify_not_equal\": true,\n  \"indent_tab\": true\n}\n```\n\nCreate `.uroborosqlfmtrc.json` in the directory where you run the command and write the configuration there.\n\nIf there is no configuration file, the default values are used.\n\n| name                                                                                                                                        | type                                 | description                                                                                                                                                                                                                                            | default |\n| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |\n| [`debug`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/debug.md)                                               | bool                                 | Run in debug mode.                                                                                                                                                                                                                                     | false   |\n| [`tab_size`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/tab_size.md)                                         | int                                  | Tab size used for formatting.                                                                                                                                                                                                                          | 4       |\n| [`complement_alias`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/complement_alias.md)                         | bool                                 | Complement aliases. Currently, column names are auto-completed with the same name. (e.g. `COL1` → `COL1 AS COL1`)                                                                                                                                      | true    |\n| [`trim_bind_param`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/trim_bind_param.md)                           | bool                                 | Trim the contents of the [bind parameters](https://future-architect.github.io/uroborosql-doc/background/#%E3%83%8F%E3%82%99%E3%82%A4%E3%83%B3%E3%83%88%E3%82%99%E3%83%8F%E3%82%9A%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF). (e.g. `/* foo */` → `/*foo*/`) | false   |\n| [`keyword_case`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/keyword_case.md)                                 | [`\"upper\"`, `\"lower\"`, `\"preserve\"`] | Unify the case of keywords. (No conversion in case of `\"preserve\"`)                                                                                                                                                                                    | lower   |\n| [`identifier_case`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/identifier_case.md)                           | [`\"upper\"`, `\"lower\"`, `\"preserve\"`] | Unify the case of identifiers. (No conversion in case of `\"preserve\"`)                                                                                                                                                                                 | lower   |\n| [`max_char_per_line`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/max_char_per_line.md)                       | int                                  | If the total number of characters in the function name and arguments exceeds `max_char_per_line`, the arguments are formatted with new lines.                                                                                                          | 50      |\n| [`complement_outer_keyword`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/complement_outer_keyword.md)         | bool                                 | Complement the optional `OUTER`. (e.g. `LEFT JOIN` → `LEFT OUTER JOIN`)                                                                                                                                                                                | true    |\n| [`complement_column_as_keyword`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/complement_column_as_keyword.md) | bool                                 | Complement `AS` in column aliases.                                                                                                                                                                                                                     | true    |\n| [`remove_table_as_keyword`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/remove_table_as_keyword.md)           | bool                                 | Remove `AS` in table aliases.                                                                                                                                                                                                                          | true    |\n| [`remove_redundant_nest`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/remove_redundant_nest.md)               | bool                                 | Remove redundant parentheses. (e.g. `(((foo)))` → `(foo)`)                                                                                                                                                                                             | true    |\n| [`complement_sql_id`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/complement_sql_id.md)                       | bool                                 | Complement [SQL ID](https://palette-doc.rtfa.as/coding-standards/forSQL/SQL%E3%82%B3%E3%83%BC%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%E8%A6%8F%E7%B4%84%EF%BC%88uroboroSQL%EF%BC%89.html#sql-%E8%AD%98%E5%88%A5%E5%AD%90).                                 | false   |\n| [`convert_double_colon_cast`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/convert_double_colon_cast.md)       | bool                                 | Convert casts by `X::type` to the form `CAST(X AS type)`.                                                                                                                                                                                              | true    |\n| [`unify_not_equal`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/unify_not_equal.md)                           | bool                                 | Convert comparison operator `\u003c\u003e` to `!=`                                                                                                                                                                                                               | true    |\n| [`indent_tab`](https://github.com/future-architect/uroborosql-fmt/blob/main/docs/options/indent_tab.md)                                     | bool                                 | Switch the indentation style between tabs and spaces.                                                                                                                                                                                                  | true    |\n\n## Available Commands\n\n| command title                                                | description                                                                                                                                                                                                                                                                                                                                      |\n| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Format SQL                                                   | You can trigger formatting by executing this command.                                                                                                                                                                                                                                                                                            |\n| Export workspace config to uroborosql-fmt config file        | You can export workspace configurations to formatter's configuration file (specified in [uroborosql-fmt.configurationFilePath](https://github.com/future-architect/vscode-uroborosql-fmt/#:~:text=uroborosql%2Dfmt.configurationFilePath)). Only the non-null configurations in `settings.json` will overwrite those in `.uroborosqlfmtrc.json`. |\n| Import uroborosql-fmt config file config to workspace config | You can import formatter's configuration into workspace configuration. Configuration values that exist in `settings.json`, but not in `.uroborosqlfmtrc.json`, will be set to `null`.                                                                                                                                                            |\n| Import uroborosql-fmt config file config to global config    | You can import formatter's configuration into global configuration. Configuration values that exist in `settings.json`, but not in `.uroborosqlfmtrc.json`, will be set to `null`.                                                                                                                                                               |\n\n## License\n\n[Business Source License 1.1](https://github.com/future-architect/vscode-uroborosql-fmt/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fvscode-uroborosql-fmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-architect%2Fvscode-uroborosql-fmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fvscode-uroborosql-fmt/lists"}