ruby-lsp 0.16.1 → 0.16.2

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: b52249bb9ff4600edc041d0ac28d961c7670f5dad2475b632fa5ea87c02e1657
4
- data.tar.gz: c15ed4c4cd012c64f526ce3c31ca0f70a248467a44034dc6ffeed50cda94d9ad
3
+ metadata.gz: a3b197d35d03d1b5b78894bce8b03c6aa76be7586fc7034422415d0656ddea7a
4
+ data.tar.gz: 2fd148c0ab5d8b3ac55784722ab49a3be6b1b4885c8b284e8a6cf40c503b4066
5
5
  SHA512:
6
- metadata.gz: bf9936e23669e947cc802e5efe4fc5466528dff0e290d3daf255522cdca7e41d08802737da2f93b0690ca3abf3916a726926b454964f21a67bb661e902494390
7
- data.tar.gz: 6d6b39a1dfe90b54e4e20a1a4eda471a71418b85c94ee305c5e9b1a77be8251a304d0da9f4c72fae28773e14bdb1f316da12ce41ef436c2bc72d78903a647fb1
6
+ metadata.gz: 1994f1d014bc3f70ff96e90d5b3961c279166e5f58be6b38415ec1e2515b7557c6a00f4cde45ba3a66e0d9dd6c1402f7e4754c6f8addb6efb848ec7a65fbadc7
7
+ data.tar.gz: ffec2a6c5321eb159ea4d505f9b6c6dd56b64cb16d2f052666b9c15f406d59fa478d9e7f7c9734219874c3ca3bb8dcae9b2cbdd683576a3d74b523cf769298e4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.1
1
+ 0.16.2
@@ -21,7 +21,7 @@ module RubyLsp
21
21
  def initialize
22
22
  @workspace_uri = T.let(URI::Generic.from_path(path: Dir.pwd), URI::Generic)
23
23
 
24
- @formatter = T.let(detect_formatter, String)
24
+ @formatter = T.let("auto", String)
25
25
  @test_library = T.let(detect_test_library, String)
26
26
  @typechecker = T.let(detect_typechecker, T::Boolean)
27
27
  @index = T.let(RubyIndexer::Index.new, RubyIndexer::Index)
@@ -42,6 +42,10 @@ module RubyLsp
42
42
  def apply_options(options)
43
43
  workspace_uri = options.dig(:workspaceFolders, 0, :uri)
44
44
  @workspace_uri = URI(workspace_uri) if workspace_uri
45
+
46
+ specified_formatter = options.dig(:initializationOptions, :formatter)
47
+ @formatter = specified_formatter if specified_formatter
48
+ @formatter = detect_formatter if @formatter == "auto"
45
49
  end
46
50
 
47
51
  sig { returns(String) }
@@ -68,17 +68,22 @@ module RubyLsp
68
68
  command: generate_test_command(group_stack: @group_stack),
69
69
  kind: :group,
70
70
  )
71
- end
72
71
 
73
- @group_id_stack.push(@group_id)
74
- @group_id += 1
72
+ @group_id_stack.push(@group_id)
73
+ @group_id += 1
74
+ end
75
75
  end
76
76
 
77
77
  sig { params(node: Prism::ClassNode).void }
78
78
  def on_class_node_leave(node)
79
79
  @visibility_stack.pop
80
80
  @group_stack.pop
81
- @group_id_stack.pop
81
+
82
+ class_name = node.constant_path.slice
83
+
84
+ if @path && class_name.end_with?("Test")
85
+ @group_id_stack.pop
86
+ end
82
87
  end
83
88
 
84
89
  sig { params(node: Prism::DefNode).void }
@@ -129,8 +129,6 @@ module RubyLsp
129
129
 
130
130
  progress = options.dig(:capabilities, :window, :workDoneProgress)
131
131
  @store.supports_progress = progress.nil? ? true : progress
132
- formatter = options.dig(:initializationOptions, :formatter) || "auto"
133
-
134
132
  configured_features = options.dig(:initializationOptions, :enabledFeatures)
135
133
  @store.experimental_features = options.dig(:initializationOptions, :experimentalFeaturesEnabled) || false
136
134
 
@@ -177,7 +175,7 @@ module RubyLsp
177
175
  document_link_provider: document_link_provider,
178
176
  folding_range_provider: folding_ranges_provider,
179
177
  semantic_tokens_provider: semantic_tokens_provider,
180
- document_formatting_provider: enabled_features["formatting"] && formatter != "none",
178
+ document_formatting_provider: enabled_features["formatting"] && @global_state.formatter != "none",
181
179
  document_highlight_provider: enabled_features["documentHighlights"],
182
180
  code_action_provider: code_action_provider,
183
181
  document_on_type_formatting_provider: on_type_formatting_provider,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-04 00:00:00.000000000 Z
11
+ date: 2024-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: language_server-protocol