{"id":20032242,"url":"https://github.com/weakish/vscode-complete-statement","last_synced_at":"2025-05-05T05:30:34.624Z","repository":{"id":146349823,"uuid":"68295883","full_name":"weakish/vscode-complete-statement","owner":"weakish","description":"Complete Statement with semicolon in vscode.","archived":false,"fork":false,"pushed_at":"2022-09-12T09:31:41.000Z","size":68,"stargazers_count":15,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T17:07:24.729Z","etag":null,"topics":["open-vsx","vscode-extension","vscodium"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weakish.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":"2016-09-15T13:23:23.000Z","updated_at":"2023-12-07T13:24:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"45e5e947-a2c8-4013-a047-04ad57759b4b","html_url":"https://github.com/weakish/vscode-complete-statement","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fvscode-complete-statement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fvscode-complete-statement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fvscode-complete-statement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fvscode-complete-statement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weakish","download_url":"https://codeload.github.com/weakish/vscode-complete-statement/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252445576,"owners_count":21749080,"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":["open-vsx","vscode-extension","vscodium"],"created_at":"2024-11-13T09:36:26.541Z","updated_at":"2025-05-05T05:30:34.616Z","avatar_url":"https://github.com/weakish.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Complete Statement with semicolon in vscode.\n\nMimic IntelliJ's complete statement.\nIn other words:\n\n- Complete normal statement with `;`, insert a newline and move down.\n- Try to complete complex structures with braces.\n\nWorks with languages with a C style syntax.\n\nStatus\n------\n\nThis project is orphaned.\nI switched to Neovim as my mainly used editor.\nI still use vscode occasionally,\nbut for languages not requiring a semicolon to end a statement.\n\nPull requests are still welcome, though.\nAnd if you want to maintain this project,\nplease open an issue or send a pull request,\nI will add you to the collaborators of the source code repository.\n\nInstall\n-------\n\nThe version on marketplace is outdated.\nPlease use [the version on open-vsx.org][open-vsx] ([vscodium] uses open-vsx by default).\nYou can also download the vsix file at [GitHub releases page][releases],\nand manually install it via \"vscode \u003e Extensions \u003e Install from VSIX...\".\n\n[open-vsx]: https://open-vsx.org/extension/weakish/complete-statement\n[vscodium]: https://vscodium.com/\n[releases]: https://github.com/weakish/vscode-complete-statement/releases\n\nIf you want to try the cutting-edge version (`master`),\nyou can clone this repository, and package it yourself:\n\n```sh\nnpx vsce package\n```\n\nKey binding\n-----------\n\nThis extension uses `ctrl+;` (`cmd+;` on mac)\nsince vscode already uses `ctrl+shift+enter`.\n\nYou can rebind `extension.complete-statement` to `ctrl+shift+enter`.\n\nBTW, `ctrl+;` is easier to remember and type than `ctrl+shift+enter`.\nI myself use `ctrl+enter` since `ctrl+;` is hard to type in dvorak.\n\nExample\n-------\n\nWe use `][` to represent cursor.\n\n```typescript\n][\nlet a_number = 2][ # decide to specify type\nlet a_number: number][ = 2\n// press `ctrl+;` (`cmd+;` on mac)\nlet a_number: number = 2;\n][\nlet semicolon: string][ = \"already exist\";\n// `ctrl+;`\nlet semicolon: string = \"already exist\";\n][\nfunction works_too(para: number][)\n// `ctrl+;`\nfunction works_too(para: number) {\n    ][\n}\n// Respects `tabSize` setting. If `tabSize` unset, use 4 spaces.\nfunction works_too(para: number) {\n    if (a_number == 1][)\n}\n// `ctrl+;`\nfunction works_too(para: number) {\n    if (a_number == 1) {\n        ][\n    }\n}\n```\n\nThe above example uses TypeScript,\nbut this extension works in most languages with a C like style,\nsuch as JavaScript, Java, Ceylon, and C itself.\nThis extension also works in languages like Kotlin, Scala, Swift, and so on.\nBut I recommend you only use it to complete complete structures,\nnot single statement since it will append a semicolon (`;`) at the end.\n\nConfiguration\n-------------\n\nBy default, complete-statement uses Java style (beginning brace on same line).\nTo use Allman style (beginning brace on its own line),\nadd the following line in settings:\n\n```json\n    \"complete-statement.allman\": true\n```\n\nBugs\n----\n\n- This extension does not understand semantics of programming languages.\n  So complete structure may not work as you expected.\n\n    For example, it cannot completes `if` with multiple line conditions.\n    The \"parsing\" is *very naive*, only covering limited conditions.\n\n- Indented with tab is not supported yet. Pull request is welcome.\n\nLicense\n-------\n\n0BSD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fvscode-complete-statement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweakish%2Fvscode-complete-statement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fvscode-complete-statement/lists"}