syntax_tree 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/Gemfile.lock +1 -1
- data/lib/syntax_tree/cli.rb +2 -2
- data/lib/syntax_tree/language_server.rb +8 -3
- data/lib/syntax_tree/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a048616da9a9591130add971fae818025454369630a12bd4bb6386b3734de556
|
4
|
+
data.tar.gz: 16ea5138a4097551063ef9eeb6be7413c1f69e41c49f2b7e8a20e3dd4ab7f0a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 680d5745acbcdcfeb9cbb92fb99927b142e9c5f4f7df65f909dc812baca22d14ede3beae973f3db05d6a81953af9f8c53113fe5ccdf86ae2592932079d82cc59
|
7
|
+
data.tar.gz: f6ac53a377cfd0150d6480611b9cc63714d3e893ef453d2b0881f4e54a8ba5e1450b5f88a38e9e7c7ed3e8eb18f45e6006fff2c5c714fd40db01cb99a615bc15
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [3.2.0] - 2022-07-19
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- [#116](https://github.com/ruby-syntax-tree/syntax_tree/pull/116) - Pass the `--print-width` option in the CLI to the language server.
|
14
|
+
|
9
15
|
## [3.1.0] - 2022-07-19
|
10
16
|
|
11
17
|
### Added
|
@@ -300,7 +306,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
300
306
|
|
301
307
|
- 🎉 Initial release! 🎉
|
302
308
|
|
303
|
-
[unreleased]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.
|
309
|
+
[unreleased]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.2.0...HEAD
|
310
|
+
[3.2.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.1.0...v3.2.0
|
304
311
|
[3.1.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.0.1...v3.1.0
|
305
312
|
[3.0.1]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.0.0...v3.0.1
|
306
313
|
[3.0.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v2.9.0...v3.0.0
|
data/Gemfile.lock
CHANGED
data/lib/syntax_tree/cli.rb
CHANGED
@@ -246,7 +246,7 @@ module SyntaxTree
|
|
246
246
|
#{Color.bold("stree help")}
|
247
247
|
Display this help message
|
248
248
|
|
249
|
-
#{Color.bold("stree lsp [--plugins=...]")}
|
249
|
+
#{Color.bold("stree lsp [--plugins=...] [--print-width=NUMBER]")}
|
250
250
|
Run syntax tree in language server mode
|
251
251
|
|
252
252
|
#{Color.bold("stree version")}
|
@@ -300,7 +300,7 @@ module SyntaxTree
|
|
300
300
|
return 0
|
301
301
|
when "lsp"
|
302
302
|
require "syntax_tree/language_server"
|
303
|
-
LanguageServer.new.run
|
303
|
+
LanguageServer.new(print_width: print_width).run
|
304
304
|
return 0
|
305
305
|
when "version"
|
306
306
|
puts SyntaxTree::VERSION
|
@@ -13,11 +13,16 @@ module SyntaxTree
|
|
13
13
|
# stree lsp
|
14
14
|
#
|
15
15
|
class LanguageServer
|
16
|
-
attr_reader :input, :output
|
16
|
+
attr_reader :input, :output, :print_width
|
17
17
|
|
18
|
-
def initialize(
|
18
|
+
def initialize(
|
19
|
+
input: $stdin,
|
20
|
+
output: $stdout,
|
21
|
+
print_width: DEFAULT_PRINT_WIDTH
|
22
|
+
)
|
19
23
|
@input = input.binmode
|
20
24
|
@output = output.binmode
|
25
|
+
@print_width = print_width
|
21
26
|
end
|
22
27
|
|
23
28
|
# rubocop:disable Layout/LineLength
|
@@ -93,7 +98,7 @@ module SyntaxTree
|
|
93
98
|
character: 0
|
94
99
|
}
|
95
100
|
},
|
96
|
-
newText: SyntaxTree.format(source)
|
101
|
+
newText: SyntaxTree.format(source, print_width)
|
97
102
|
}
|
98
103
|
end
|
99
104
|
|
data/lib/syntax_tree/version.rb
CHANGED