{"id":13649399,"url":"https://github.com/vim-crystal/vim-crystal","last_synced_at":"2025-04-05T10:08:49.474Z","repository":{"id":14196060,"uuid":"16902620","full_name":"vim-crystal/vim-crystal","owner":"vim-crystal","description":"Vim filetype and tools support for Crystal language.","archived":false,"fork":false,"pushed_at":"2023-03-15T04:38:13.000Z","size":335,"stargazers_count":411,"open_issues_count":13,"forks_count":33,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-13T16:31:31.406Z","etag":null,"topics":["crystal","syntax-highlighting","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"http://crystal-lang.org/","language":"Vim Script","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/vim-crystal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2014-02-17T05:15:19.000Z","updated_at":"2024-05-02T20:57:47.383Z","dependencies_parsed_at":"2024-05-02T20:57:45.318Z","dependency_job_id":"dcef01d7-c7d9-44cb-83af-602d6b5fbf8a","html_url":"https://github.com/vim-crystal/vim-crystal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-crystal%2Fvim-crystal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-crystal%2Fvim-crystal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-crystal%2Fvim-crystal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-crystal%2Fvim-crystal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vim-crystal","download_url":"https://codeload.github.com/vim-crystal/vim-crystal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318744,"owners_count":20919484,"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":["crystal","syntax-highlighting","vim","vim-plugin"],"created_at":"2024-08-02T01:04:59.385Z","updated_at":"2025-04-05T10:08:49.443Z","avatar_url":"https://github.com/vim-crystal.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Editor Plugins"],"sub_categories":[],"readme":"Vim Filetype Support for [Crystal](http://crystal-lang.org/)\n============================================================\n[![CI](https://github.com/vim-crystal/vim-crystal/workflows/CI/badge.svg?event=push)](https://github.com/vim-crystal/vim-crystal/actions?query=CI+branch%3Amaster)\n\nThis is Vim filetype support for [Crystal programming language](http://crystal-lang.org/).\n\n- `crystal` filetype detection\n- Syntax highlight\n- Indentation\n- eCrystal support\n- vim-matchit support\n- `crystal tool` integration ([implementations](http://crystal-lang.org/2015/09/05/tools.html),\n  [context](http://crystal-lang.org/2015/09/05/tools.html),\n  [formatter](http://crystal-lang.org/2015/10/16/crystal-0.9.0-released.html), and so on)\n- `crystal spec` integration\n- Syntax check (Using [Syntastic](https://github.com/scrooloose/syntastic))\n- Completion (currently for variable names)\n\n\n\n## Installation\n\nPlease copy `autoload`, `ftdetect`, `ftplugin`, `indent`, `plugin` and `syntax` directories into\nyour `~/.vim` (or `~/vimfiles` in Windows) directory.\n\n```\n$ cp -R autoload ftdetect ftplugin indent plugin syntax ~/.vim/\n\n$ # If you use vim-syntastic\n$ cp -R syntax_checkers ~/.vim/\n```\n\nIf you use Vim8, `:packadd` is available to install. Please see `:help packages` for more details.\n\nOtherwise, please use your favorite plugin manager like [vim-plug](https://github.com/junegunn/vim-plug).\n\n\n\n## Syntax Highlight\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/vim-crystal/highlight1.png)\n\nThis plugin was firstly imported from Ruby's filetype plugin.  There are many differences between\nRuby and Crystal but vim-crystal can't support all of them yet.  In addition, Crystal is growing\nrapidly and being added many changes.  If you've found some issues or points to improve, pull\nrequests and issues are welcome.\n\n\n\n## Spec Integration\n\n![screen shot: run spec](https://raw.githubusercontent.com/rhysd/ss/master/vim-crystal/spec.gif)\n\nRunning spec(s) and show the result in Vim.  The output is colorful if possible as executed in CLI.\n\n### `:CrystalSpecSwitch` (mapping to `gss`)\n\nIt switches current source file and its spec file.  This command assumes the standard directory\nlayout which `crystal init` generates.\n\nIf you don't set `g:crystal_define_mappings` to 0, you can use this feature with mapping `gss`.\n\n### `:CrystalSpecRunAll` (mapping to `gsa`)\n\nIt runs the all specs for current file's project.\n\nIf you don't set `g:crystal_define_mappings` to 0, you can use this feature with mapping `gsa`.\n\n### `:CrystalSpecRunCurrent` (mapping to `gsc`)\n\nIt runs spec for current buffer.\n\n1. When current buffer is a spec source, `:CrystalSpecRunCurrent` runs the spec under the cursor.\n   You should execute this command after moving cursor to `it ... do` line or `describe ... do` line.\n2. When current buffer is not a spec source, `:CrystalSpecRunCurrent` finds corresponding spec source\n   and runs all specs in the source.\n\nIf you don't set `g:crystal_define_mappings` to 0, you can use this feature with mapping `gsc`.\n\n## Formatter Integration\n\n![format screenshot](https://raw.githubusercontent.com/rhysd/ss/master/vim-crystal/formatting.gif)\n\nYou can run formatter manually by `:CrystalFormat` or automatically at saving buffer.\n\nWhen you set `g:crystal_auto_format` to `1`, current buffer is automatically formatted on `BufWritePre`.\nThe variable is set to `0` by default because `crystal tool format` currently seems buggy.\n\n\n## Tool Integration\n\n### `:CrystalDef` (mapping to `gd`)\n\nIt makes cursor jump to the definition of name under the cursor.  This command uses `crystal tool implementations`.\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/vim-crystal/jump-to-definition.gif)\n\nIf you don't set `g:crystal_define_mappings` to 0, you can use this feature with mapping `gd`.\n\n### `:CrystalContext` (mapping to `gc`)\n\nIt shows the _context_ under the cursor. Context includes variable names and their types.\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/vim-crystal/show-context.gif)\n\nIf you don't set `g:crystal_define_mappings` to 0, you can use this feature with mapping `gc`.\n\n### `:CrystalHierarchy`\n\nIt shows types hierarchy of current code.\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/vim-crystal/show-hierarchy.gif)\n\n### `:CrystalImpl`\n\nIt shows how the identifier under the cursor is implemented. For example, when the cursor is on some\nproperty of an object instance, `:CrystalImpl` would report where the property is defined with\n`property` macro.\n\n### `:CrystalExpand`\n\nIt expands macro invocation under the cursor.\n\n\n## Completion\n\nOmni completion for crystal can be used by `\u003cC-x\u003e\u003cC-o\u003e`.  (Please see `:help ins-completion`)\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/vim-crystal/completion.gif)\n\nCurrently you can complete only variable names. If you want more advanced completion, please\nconsider to use a language server like [crystalline](https://github.com/elbywan/crystalline).\n\nIf you want to disable this feature, set `0` to `g:crystal_enable_completion`.\n\n## Maintainers\n\n- [@rhysd](https://github.com/rhysd) (author, maintainer)\n\n## License\n\nThis plugin is distributed under the [MIT License](http://opensource.org/licenses/MIT).\nPlease read [LICENSE.txt](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-crystal%2Fvim-crystal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvim-crystal%2Fvim-crystal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-crystal%2Fvim-crystal/lists"}