rfmt 1.5.2-aarch64-linux → 1.6.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/README.md +22 -18
- data/lib/rfmt/3.3/rfmt.so +0 -0
- data/lib/rfmt/3.4/rfmt.so +0 -0
- data/lib/rfmt/version.rb +1 -1
- data/lib/ruby_lsp/rfmt/formatter_runner.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6aa4ee193a6d3771e9fdf0c73c7bd930640e8aacbf01656c21a40392c9ea6304
|
|
4
|
+
data.tar.gz: b3449cbc83b606d8d13bf8e9235f02a1f6b6e7441e55dcfd50de4c1e14b8139e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 926ea7ec34c5cab902782f7d94313b7c66515e5763d65a4d493be558416e137a09cb2c94c90b92a93fa74c21df38b59466fa7cf807f37a0693dea53946eb2263
|
|
7
|
+
data.tar.gz: 8c7d31435fa536fc516243869de9c2f37f910a5dbfd280a7c613e9bf3b7db8b1fe9429800bbaf8844a432457d26087b515a6429594b2dcce46e8b3600f49bbeb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.6.0] - 2026-04-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **Rule-based formatter architecture**: new modular `format/` pipeline (`Formatter`, `Registry`, `Rule`) replacing the legacy monolithic emitter
|
|
7
|
+
- **Intermediate Representation (IR) module**: decouples parsing from emission for composability and testability
|
|
8
|
+
- New formatter rules: `StatementsRule` (body indentation), `SingletonClassRule`, `VariableWriteRule`
|
|
9
|
+
- Method chain reformatting: convert aligned style to indented style when lines exceed the configured width
|
|
10
|
+
- Chain reformatting wired into the fallback path for resilience
|
|
11
|
+
- `config` module exported for test consumption
|
|
12
|
+
- **Editor Integration Documentation**: comprehensive setup guides for VSCode, Neovim, Helix, Emacs, and Zed
|
|
13
|
+
- VSCode: Format on Save configuration with Ruby LSP, settings reference table, project-specific setup
|
|
14
|
+
- Zed: full configuration with `initialization_options` and `format_on_save`
|
|
15
|
+
- All editors work through the Ruby LSP addon system — no editor-specific plugins required
|
|
16
|
+
- README: Editor Integration section updated with VSCode quick start (replacing "Coming Soon")
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Printer optimized with indent cache and inline hints
|
|
20
|
+
- `reformat_chain_lines` deduplicated across rules and optimized with `Cow` to reduce allocations
|
|
21
|
+
- README: Neovim integration updated from CLI-based to Ruby LSP-based approach
|
|
22
|
+
- Removed Sublime Text section from editor documentation (replaced by Zed)
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Prism comment JSON deserialization now accepts `comment_type` and `embdoc` fields (#97)
|
|
26
|
+
- BTreeMap range panic when computing comment indices on edge inputs
|
|
27
|
+
- Comment duplication during source extraction
|
|
28
|
+
- Empty source input handled gracefully by the formatter runner
|
|
29
|
+
- Clippy warnings: use `repeat_n`
|
|
30
|
+
|
|
31
|
+
### Removed
|
|
32
|
+
- Legacy `Emitter` module (1844 LOC) — superseded by the new `Formatter`
|
|
33
|
+
|
|
34
|
+
## [1.5.3] - 2026-02-22
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
- Update package dependencies
|
|
38
|
+
|
|
3
39
|
## [1.5.2] - 2026-02-21
|
|
4
40
|
|
|
5
41
|
### Added
|
data/README.md
CHANGED
|
@@ -361,30 +361,34 @@ end
|
|
|
361
361
|
|
|
362
362
|
## Editor Integration
|
|
363
363
|
|
|
364
|
-
|
|
364
|
+
rfmt integrates with editors through [Ruby LSP](https://shopify.github.io/ruby-lsp/). For detailed setup instructions, see [Editor Integration Guide](docs/editors.md).
|
|
365
|
+
|
|
366
|
+
### VSCode (Quick Start)
|
|
365
367
|
|
|
366
|
-
|
|
368
|
+
1. Install [Ruby LSP extension](https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-lsp)
|
|
369
|
+
2. Add to your `settings.json`:
|
|
370
|
+
|
|
371
|
+
```json
|
|
372
|
+
{
|
|
373
|
+
"rubyLsp.formatter": "rfmt",
|
|
374
|
+
"editor.formatOnSave": true,
|
|
375
|
+
"[ruby]": {
|
|
376
|
+
"editor.defaultFormatter": "Shopify.ruby-lsp"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Neovim
|
|
367
382
|
|
|
368
383
|
```lua
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
callback = function()
|
|
374
|
-
local filepath = vim.fn.expand("%:p")
|
|
375
|
-
local result = vim.fn.system({ "rfmt", filepath })
|
|
376
|
-
if vim.v.shell_error == 0 then
|
|
377
|
-
vim.cmd("edit!")
|
|
378
|
-
end
|
|
379
|
-
end,
|
|
384
|
+
require("lspconfig").ruby_lsp.setup({
|
|
385
|
+
init_options = {
|
|
386
|
+
formatter = "rfmt"
|
|
387
|
+
}
|
|
380
388
|
})
|
|
381
389
|
```
|
|
382
390
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
- **VS Code** - Extension in development
|
|
386
|
-
- **RubyMine** - Plugin in development
|
|
387
|
-
- **Zed** - Extension in development
|
|
391
|
+
See [Editor Integration Guide](docs/editors.md) for Helix, Emacs, Sublime Text, and more.
|
|
388
392
|
|
|
389
393
|
## Development
|
|
390
394
|
|
data/lib/rfmt/3.3/rfmt.so
CHANGED
|
Binary file
|
data/lib/rfmt/3.4/rfmt.so
CHANGED
|
Binary file
|
data/lib/rfmt/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rfmt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- fujitani sora
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: diff-lcs
|