rfmt 1.3.0-x86_64-darwin
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 +7 -0
- data/CHANGELOG.md +223 -0
- data/LICENSE.txt +21 -0
- data/README.md +397 -0
- data/exe/rfmt +21 -0
- data/lib/rfmt/3.1/rfmt.bundle +0 -0
- data/lib/rfmt/3.2/rfmt.bundle +0 -0
- data/lib/rfmt/3.3/rfmt.bundle +0 -0
- data/lib/rfmt/cache.rb +112 -0
- data/lib/rfmt/cli.rb +308 -0
- data/lib/rfmt/configuration.rb +95 -0
- data/lib/rfmt/prism_bridge.rb +390 -0
- data/lib/rfmt/prism_node_extractor.rb +115 -0
- data/lib/rfmt/version.rb +5 -0
- data/lib/rfmt.rb +172 -0
- data/lib/ruby_lsp/rfmt/addon.rb +20 -0
- data/lib/ruby_lsp/rfmt/formatter_runner.rb +26 -0
- metadata +68 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rfmt'
|
|
4
|
+
|
|
5
|
+
module RubyLsp
|
|
6
|
+
module Rfmt
|
|
7
|
+
class FormatterRunner
|
|
8
|
+
# @param uri [URI::Generic] Document URI
|
|
9
|
+
# @param document [RubyLsp::RubyDocument] Target document
|
|
10
|
+
# @return [String, nil] Formatted text or nil on error
|
|
11
|
+
def run_formatting(_uri, document)
|
|
12
|
+
source = document.source
|
|
13
|
+
::Rfmt.format(source)
|
|
14
|
+
rescue ::Rfmt::Error
|
|
15
|
+
nil
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# @param uri [URI::Generic] Document URI
|
|
19
|
+
# @param document [RubyLsp::RubyDocument] Target document
|
|
20
|
+
# @return [Array<RubyLsp::Interface::Diagnostic>]
|
|
21
|
+
def run_diagnostic(_uri, _document)
|
|
22
|
+
[]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rfmt
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.3.0
|
|
5
|
+
platform: x86_64-darwin
|
|
6
|
+
authors:
|
|
7
|
+
- fujitani sora
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-01-06 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Write a longer description or delete this line.
|
|
14
|
+
email:
|
|
15
|
+
- fujitanisora0414@gmail.com
|
|
16
|
+
executables:
|
|
17
|
+
- rfmt
|
|
18
|
+
extensions: []
|
|
19
|
+
extra_rdoc_files: []
|
|
20
|
+
files:
|
|
21
|
+
- CHANGELOG.md
|
|
22
|
+
- LICENSE.txt
|
|
23
|
+
- README.md
|
|
24
|
+
- exe/rfmt
|
|
25
|
+
- lib/rfmt.rb
|
|
26
|
+
- lib/rfmt/3.1/rfmt.bundle
|
|
27
|
+
- lib/rfmt/3.2/rfmt.bundle
|
|
28
|
+
- lib/rfmt/3.3/rfmt.bundle
|
|
29
|
+
- lib/rfmt/cache.rb
|
|
30
|
+
- lib/rfmt/cli.rb
|
|
31
|
+
- lib/rfmt/configuration.rb
|
|
32
|
+
- lib/rfmt/prism_bridge.rb
|
|
33
|
+
- lib/rfmt/prism_node_extractor.rb
|
|
34
|
+
- lib/rfmt/version.rb
|
|
35
|
+
- lib/ruby_lsp/rfmt/addon.rb
|
|
36
|
+
- lib/ruby_lsp/rfmt/formatter_runner.rb
|
|
37
|
+
homepage: https://github.com/fs0414/rfmt
|
|
38
|
+
licenses:
|
|
39
|
+
- MIT
|
|
40
|
+
metadata:
|
|
41
|
+
allowed_push_host: https://rubygems.org
|
|
42
|
+
homepage_uri: https://github.com/fs0414/rfmt
|
|
43
|
+
source_code_uri: https://github.com/fs0414/rfmt
|
|
44
|
+
changelog_uri: https://github.com/fs0414/rfmt/releases
|
|
45
|
+
ruby_lsp_addon: 'true'
|
|
46
|
+
post_install_message:
|
|
47
|
+
rdoc_options: []
|
|
48
|
+
require_paths:
|
|
49
|
+
- lib
|
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '3.1'
|
|
55
|
+
- - "<"
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: 3.4.dev
|
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - ">="
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: 3.0.0
|
|
63
|
+
requirements: []
|
|
64
|
+
rubygems_version: 3.5.23
|
|
65
|
+
signing_key:
|
|
66
|
+
specification_version: 4
|
|
67
|
+
summary: Ruby Formatter impl Rust lang.
|
|
68
|
+
test_files: []
|