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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3364d1c9d427dd3e40d76f2598569399f3099870f247e1fc740d0d5c06d72e36
4
- data.tar.gz: 24272efb6a8272b32446a3865425ed74cbb223a64798611012732c102321dfd6
3
+ metadata.gz: a048616da9a9591130add971fae818025454369630a12bd4bb6386b3734de556
4
+ data.tar.gz: 16ea5138a4097551063ef9eeb6be7413c1f69e41c49f2b7e8a20e3dd4ab7f0a1
5
5
  SHA512:
6
- metadata.gz: b824e69bf60fbf5c0d4a77cb4981243913cdfd22b09bcfd88c0bdd758b92be9d89462cf106b1bce3098e777b811aa87bc076dc0eac3369f33009719381290135
7
- data.tar.gz: 9a5dad257dd35c7a45fbef150c189e01823595ec079df9e09aafe70347a0e41278d9cca3cb5b184b49b789d9460d5332e9c516629122d08f529b0961d42a2284
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.1.0...HEAD
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- syntax_tree (3.1.0)
4
+ syntax_tree (3.2.0)
5
5
  prettier_print
6
6
 
7
7
  GEM
@@ -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(input: $stdin, output: $stdout)
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SyntaxTree
4
- VERSION = "3.1.0"
4
+ VERSION = "3.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syntax_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Newton