{"id":15439273,"url":"https://github.com/yaegassy/coc-ast-grep","last_synced_at":"2025-04-19T18:33:12.227Z","repository":{"id":103554544,"uuid":"566054976","full_name":"yaegassy/coc-ast-grep","owner":"yaegassy","description":"coc.nvim extension for ast-grep language server","archived":false,"fork":false,"pushed_at":"2025-03-20T02:29:16.000Z","size":267,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T15:04:07.546Z","etag":null,"topics":["coc-extensions","coc-nvim","neovim","vim"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaegassy.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-11-14T21:53:57.000Z","updated_at":"2025-03-20T02:29:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"60c866f7-9314-439e-8e47-5d97600461e0","html_url":"https://github.com/yaegassy/coc-ast-grep","commit_stats":{"total_commits":99,"total_committers":2,"mean_commits":49.5,"dds":"0.14141414141414144","last_synced_commit":"ea97c3bccfb00f08f622d2095f5800d26799454f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-ast-grep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-ast-grep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-ast-grep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-ast-grep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaegassy","download_url":"https://codeload.github.com/yaegassy/coc-ast-grep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249239236,"owners_count":21235820,"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":["coc-extensions","coc-nvim","neovim","vim"],"created_at":"2024-10-01T19:04:05.057Z","updated_at":"2025-04-16T12:30:40.749Z","avatar_url":"https://github.com/yaegassy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [WIP] coc-ast-grep\n\n\u003e fork from a [ast-grep-vscode](https://github.com/ast-grep/ast-grep-vscode)\n\n[coc.nvim](https://github.com/neoclide/coc.nvim) extension for [ast-grep](https://github.com/ast-grep/ast-grep) language server\n\n\u003cimg width=\"780\" alt=\"coc-ast-grep-screenshot\" src=\"https://user-images.githubusercontent.com/188642/201776507-fc061532-6ef7-4368-9e03-1d50fe5107aa.png\"\u003e\n\n## Install\n\nYou need to have [coc.nvim](https://github.com/neoclide/coc.nvim) installed for this extension to work.\n\n**e.g. vim-plug**:\n\n```vim\nPlug 'yaegassy/coc-ast-grep', {'do': 'yarn install --frozen-lockfile'}\n```\n\n## Usage\n\nThe ast-grep language server requires `sgconfig.yml` in the project root to work properly.\n\n- See: \u003chttps://ast-grep.github.io/guide/rule-config.html\u003e\n\n## !!Known Issues!!\n\nThe language client will crash if `sgconfig.yml` is not in the project root or if the rules are not properly configured.\n\nI think it needs to be adjusted either on the ast-grep language server (`sg lsp`) side or on the `coc.nvim` side.\n\n## !!Note!!\n\nCurrently the extension is only enabled in `typescript` files.\n\n```\n{\n  // ...snip\n  \"activationEvents\": [\n    \"onLanguage:typescript\"\n  ],\n  // ...snip\n}\n```\n\n## Configuration options\n\n- `astGrep.enable`: Enable coc-ast-grep extension, default: `true`\n- `astGrep.serverPath`: Specify the language server binary path. If the binary is not found, use the binary included in the extension, default: `sg`\n- `astGrep.configPath`: Customize ast-grep config file path relative.\n\n## To register a ast-grep language server without coc-extension\n\nAdd the following settings to `coc-settings.json`.\n\n```json\n{\n  \"languageserver\": {\n    \"ast-grep\": {\n      \"command\": \"sg\",\n      \"args\": [\"lsp\"],\n      \"filetypes\": [\"typescript\"],\n      \"rootPatterns\": [\n        \"sgconfig.yml\"\n      ]\n    }\n  }\n}\n```\n\n## Thanks\n\n- [ast-grep](https://github.com/ast-grep/ast-grep)\n- [ast-grep-vscode](https://github.com/ast-grep/ast-grep-vscode)\n\n## License\n\nMIT\n\n---\n\n\u003e This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegassy%2Fcoc-ast-grep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaegassy%2Fcoc-ast-grep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegassy%2Fcoc-ast-grep/lists"}