[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-11699":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":9,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":16,"starSnapshotCount":16,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},11699,"rubyfmt","fables-tales\u002Frubyfmt","fables-tales","Ruby Autoformatter!",null,"https:\u002F\u002Fgithub.com\u002Ffables-tales\u002Frubyfmt","Rust",1213,64,14,7,0,1,23,18.44,false,"main","2026-06-12 02:02:33","# rubyfmt\n\nA fast, opinionated Ruby formatter written in Rust.\n\n- Try it online → [rubyfmt.run](https:\u002F\u002Frubyfmt.run)\n\nPronunciation: (en) \"Ruby Format\", (jp) ルビーフォーマット\n\n## Quick Start\n\n```bash\n# Install\nbrew install rubyfmt\n\n# Format a file in place\nrubyfmt -i myfile.rb\n\n# Format and print to stdout\nrubyfmt myfile.rb\n```\n\n## Installation\n\n### Homebrew\n\n```bash\nbrew install rubyfmt\n```\n\n### Build from Source\n\n1. Make sure you have Cargo installed\n2. Run `cargo build --release`\n3. Copy `target\u002Frelease\u002Frubyfmt-main` to somewhere on your path as `rubyfmt`\n\n## Usage\n\n### Command Line\n\n| Command                  | Description                     |\n| ------------------------ | ------------------------------- |\n| `rubyfmt file.rb`        | Output formatted code to stdout |\n| `rubyfmt -i file.rb`     | Format file in place            |\n| `rubyfmt -c file.rb`     | Show diff of changes            |\n| `cat file.rb \\| rubyfmt` | Read from stdin                 |\n\nYou can also pass directories to format multiple files at once.\n\nFor the full command line interface, see `rubyfmt --help`.\n\n### Header Comments\n\nControl formatting on a per-file basis with header comments:\n\n- `rubyfmt --header-opt-in` - Only format files with `# rubyfmt: true` at the top\n- `rubyfmt --header-opt-out` - Skip files with `# rubyfmt: false` at the top\n\n### Ignoring Files\n\nCreate a `.rubyfmtignore` file in your project root to exclude files from formatting. It uses the same syntax as `.gitignore`.\n\nBy default, rubyfmt also respects your `.gitignore`. Use `--include-gitignored` to format those files anyway.\n\n## Editor Integration\n\n### Visual Studio Code\n\nThe popular [`ruby-lsp` extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=Shopify.ruby-lsp) has a [rubyfmt add-on](https:\u002F\u002Fgithub.com\u002Freese\u002Fruby-lsp-rubyfmt-formatter). Install the extension:\n\n```bash\n# Add to project\nbundle add ruby-lsp-rubyfmt-formatter --group development\n\n# Install globally\ngem install ruby-lsp-rubyfmt-formatter\n```\n\nAnd then add the following to your `.vscode\u002Fsettings.json`:\n\n```json\n{\n  \"[ruby]\": {\n    \"editor.defaultFormatter\": \"Shopify.ruby-lsp\",\n    \"editor.formatOnSave\": true\n  },\n  \"rubyLsp.formatter\": \"rubyfmt\"\n}\n```\n\nRubyfmt is also supported by the (now-deprecated) [VSCode Ruby extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=rebornix.Ruby). Add the following to your `settings.json`:\n\n```json\n{\n  \"ruby.useLanguageServer\": true,\n  \"ruby.format\": \"rubyfmt\",\n  \"[ruby]\": {\n    \"editor.formatOnSave\": true\n  }\n}\n```\n\nThis is additionally supported by the [Formatto for VS Code](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=damolinx.formatto) extension.  Use it as your project's formatter by adding this entry to your `.vscode\u002Fsettings.json` after installing the extension: \n\n```jsonc\n{\n  \"[ruby]\": {\n    \"editor.defaultFormatter\": \"damolinx.formatto\"\n  },\n}\n```\n\nCheck its [README](https:\u002F\u002Fgithub.com\u002Fdamolinx\u002Fvscode-formatto#readme) for additional configuration options.\n\n### Neovim + null-ls\n\nThe [null-ls](https:\u002F\u002Fgithub.com\u002Fjose-elias-alvarez\u002Fnull-ls.nvim) plugin supports rubyfmt out of the box:\n\n```lua\nnull_ls.setup({\n  sources = {\n    null_ls.builtins.formatting.rubyfmt,\n  },\n})\n```\n\nSee the [null-ls documentation](https:\u002F\u002Fgithub.com\u002Fjose-elias-alvarez\u002Fnull-ls.nvim\u002Fblob\u002Fmain\u002Fdoc\u002FBUILTINS.md#rubyfmt) for more details.\n\n### Vim\n\n1. Run `cargo build --release`\n2. Add `source \u002Fpath\u002Fto\u002Frubyfmt.vim` to your `~\u002F.vimrc`\n3. Add `let g:rubyfmt_path = \u002Fpath\u002Fto\u002Ftarget\u002Frelease\u002Frubyfmt-main` beneath the source line\n\n### RubyMine (and JetBrains IDEs)\n\n1. Install the [File Watchers plugin](https:\u002F\u002Fwww.jetbrains.com\u002Fhelp\u002Fruby\u002Fsettings-tools-file-watchers.html)\n2. Go to File | Settings | Tools | File Watchers\n3. Import [`watchers.xml`](editor_plugins\u002Frubymine\u002Fwatchers.xml)\n4. Optionally set Level to Global for all projects\n\nSee the [File Watchers documentation](https:\u002F\u002Fwww.jetbrains.com\u002Fhelp\u002Fruby\u002Fusing-file-watchers.html#ws_filewatcher_type_and_location_of_input_files) for more details.\n\n### Sublime Text\n\nInstall the [rubyfmt plugin](https:\u002F\u002Fgithub.com\u002Ftoreriklinnerud\u002Fsublime-rubyfmt\u002F) via Package Control.\n\nFiles format on save or with `Cmd + ;` (macOS) \u002F `Alt + ;` (other). Settings:\n\n```json\n{\n  \"ruby_executable\": \"ruby\",\n  \"rubyfmt_executable\": \"rubyfmt\",\n  \"format_on_save\": true\n}\n```\n\n### Atom\n\nInstall the [rubyfmt package](https:\u002F\u002Fgithub.com\u002Ftoreriklinnerud\u002Fatom-rubyfmt\u002F) from Settings > Packages.\n\nFiles format on save or with `Cmd + ;` (macOS) \u002F `Alt + ;` (other).\n\n## Rubocop\n\nFor usage with Rubocop, see the [rubocop-rubyfmt](https:\u002F\u002Fgithub.com\u002Freese\u002Frubocop-rubyfmt) gem.\n\n## Contributing\n\nPlease check out our [contributing guide](.\u002FCONTRIBUTING.md).\n\n## Maintenance Status\n\nThe original author (fables-tales) is no longer working on open source in their spare time.\nOther contributors work regularly on `rubyfmt`, and contributors with commit access are welcome to merge changes that pass CI.\n","rubyfmt 是一个用 Rust 编写的 Ruby 代码自动格式化工具。它提供快速且具有明确风格的代码格式化功能，支持通过命令行或编辑器插件进行操作。用户可以通过简单的命令如 `rubyfmt -i myfile.rb` 对文件进行就地格式化，或者使用 `rubyfmt myfile.rb` 将格式化后的代码输出到标准输出。此外，rubyfmt 允许通过文件头部注释控制单个文件的格式化行为，并可通过 `.rubyfmtignore` 文件排除不需要格式化的文件。此工具非常适合需要保持一致编码风格的 Ruby 开发项目，尤其是在团队协作环境中，能够帮助开发者减少因代码风格不统一而引起的合并冲突。",2,"2026-06-11 03:32:21","trending"]