ruby-lsp 0.27.0.beta2 → 0.27.0.beta3
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/VERSION +1 -1
- data/exe/ruby-lsp +0 -46
- data/exe/ruby-lsp-check +0 -15
- data/lib/ruby_lsp/global_state.rb +0 -5
- data/lib/ruby_lsp/internal.rb +2 -1
- data/lib/ruby_lsp/listeners/code_lens.rb +1 -1
- data/lib/ruby_lsp/listeners/completion.rb +246 -382
- data/lib/ruby_lsp/listeners/definition.rb +6 -9
- data/lib/ruby_lsp/listeners/hover.rb +11 -9
- data/lib/ruby_lsp/listeners/signature_help.rb +11 -12
- data/lib/ruby_lsp/listeners/test_discovery.rb +17 -1
- data/lib/ruby_lsp/listeners/test_style.rb +1 -1
- data/lib/ruby_lsp/requests/completion_resolve.rb +49 -29
- data/lib/ruby_lsp/requests/references.rb +21 -7
- data/lib/ruby_lsp/requests/rename.rb +1 -1
- data/lib/ruby_lsp/requests/support/common.rb +69 -68
- data/lib/ruby_lsp/ruby_document.rb +0 -73
- data/lib/ruby_lsp/rubydex/declaration.rb +128 -2
- data/lib/ruby_lsp/rubydex/definition.rb +16 -0
- data/lib/ruby_lsp/rubydex/signature.rb +107 -0
- data/lib/ruby_lsp/scripts/compose_bundle.rb +1 -1
- data/lib/ruby_lsp/server.rb +7 -162
- data/lib/ruby_lsp/test_helper.rb +0 -1
- data/lib/ruby_lsp/test_reporters/lsp_reporter.rb +1 -1
- data/lib/ruby_lsp/type_inferrer.rb +2 -2
- metadata +11 -14
- data/lib/ruby_indexer/lib/ruby_indexer/configuration.rb +0 -276
- data/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +0 -1101
- data/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb +0 -44
- data/lib/ruby_indexer/lib/ruby_indexer/entry.rb +0 -605
- data/lib/ruby_indexer/lib/ruby_indexer/index.rb +0 -1077
- data/lib/ruby_indexer/lib/ruby_indexer/location.rb +0 -37
- data/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb +0 -149
- data/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb +0 -294
- data/lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb +0 -32
- data/lib/ruby_indexer/ruby_indexer.rb +0 -19
- /data/lib/{ruby_indexer/lib/ruby_indexer → ruby_lsp}/uri.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3bc7e833f5619665b205e3346555594540a1150cf4a66514ed1fe6900fc8d0e
|
|
4
|
+
data.tar.gz: c7cf77eed53ba29b680221474abffd5356f723dd4bb2bd586b8158c5b3794dba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b265bbdf75bd46df7acc181a9d77aced50b403b5efa21dc7c22eeda92b5b0319b5d1ac21a279d2c436c5126026c3f643760974c57d26bbbcc32ca69fba5b9bc
|
|
7
|
+
data.tar.gz: ee7b8e028a2a38e301ec14c33c2a7c6f292e89f1c850a935b26dce19bc4a10f15915a07c2dea8f8e32839acd3018f7613e698a06d6e908b3334d38cccddd47de
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.27.0.
|
|
1
|
+
0.27.0.beta3
|
data/exe/ruby-lsp
CHANGED
|
@@ -17,14 +17,6 @@ parser = OptionParser.new do |opts|
|
|
|
17
17
|
options[:debug] = true
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
opts.on("--time-index", "Measure the time it takes to index the project") do
|
|
21
|
-
options[:time_index] = true
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
opts.on("--doctor", "Run troubleshooting steps") do
|
|
25
|
-
options[:doctor] = true
|
|
26
|
-
end
|
|
27
|
-
|
|
28
20
|
opts.on("--use-launcher", "[EXPERIMENTAL] Use launcher mechanism to handle missing dependencies gracefully") do
|
|
29
21
|
options[:launcher] = true
|
|
30
22
|
end
|
|
@@ -110,44 +102,6 @@ if options[:debug]
|
|
|
110
102
|
end
|
|
111
103
|
end
|
|
112
104
|
|
|
113
|
-
if options[:time_index]
|
|
114
|
-
index = RubyIndexer::Index.new
|
|
115
|
-
|
|
116
|
-
time_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
117
|
-
index.index_all
|
|
118
|
-
elapsed_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) - time_start
|
|
119
|
-
|
|
120
|
-
entries = index.instance_variable_get(:@entries)
|
|
121
|
-
entries_by_entry_type = entries.values.flatten.group_by(&:class)
|
|
122
|
-
|
|
123
|
-
puts <<~MSG
|
|
124
|
-
Ruby LSP v#{RubyLsp::VERSION}: Indexing took #{elapsed_time.round(5)} seconds and generated:
|
|
125
|
-
- #{entries_by_entry_type.sort_by { |k, _| k.to_s }.map { |k, v| "#{k.name.split("::").last}: #{v.size}" }.join("\n- ")}
|
|
126
|
-
MSG
|
|
127
|
-
return
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
if options[:doctor]
|
|
131
|
-
index = RubyIndexer::Index.new
|
|
132
|
-
|
|
133
|
-
if File.exist?(".index.yml")
|
|
134
|
-
begin
|
|
135
|
-
config = YAML.parse_file(".index.yml").to_ruby
|
|
136
|
-
rescue => e
|
|
137
|
-
abort("Error parsing config: #{e.message}")
|
|
138
|
-
end
|
|
139
|
-
index.configuration.apply_config(config)
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
puts "Globbing for indexable files"
|
|
143
|
-
|
|
144
|
-
index.configuration.indexable_uris.each do |uri|
|
|
145
|
-
puts "indexing: #{uri}"
|
|
146
|
-
index.index_file(uri)
|
|
147
|
-
end
|
|
148
|
-
return
|
|
149
|
-
end
|
|
150
|
-
|
|
151
105
|
server = RubyLsp::Server.new
|
|
152
106
|
|
|
153
107
|
# Ensure all output goes out stderr by default to allow puts/p/pp to work
|
data/exe/ruby-lsp-check
CHANGED
|
@@ -36,21 +36,6 @@ ensure
|
|
|
36
36
|
end
|
|
37
37
|
puts "\n"
|
|
38
38
|
|
|
39
|
-
# Indexing
|
|
40
|
-
puts "Verifying that indexing executes successfully. This may take a while..."
|
|
41
|
-
|
|
42
|
-
index = RubyIndexer::Index.new
|
|
43
|
-
uris = index.configuration.indexable_uris
|
|
44
|
-
|
|
45
|
-
uris.each_with_index do |uri, i|
|
|
46
|
-
index.index_file(uri)
|
|
47
|
-
rescue => e
|
|
48
|
-
errors[uri.full_path] = e
|
|
49
|
-
ensure
|
|
50
|
-
print("\033[M\033[0KIndexed #{i + 1}/#{uris.length}") unless ENV["CI"]
|
|
51
|
-
end
|
|
52
|
-
puts "\n"
|
|
53
|
-
|
|
54
39
|
if errors.empty?
|
|
55
40
|
puts "All operations completed successfully!"
|
|
56
41
|
exit
|
|
@@ -27,9 +27,6 @@ module RubyLsp
|
|
|
27
27
|
#: bool
|
|
28
28
|
attr_reader :has_type_checker
|
|
29
29
|
|
|
30
|
-
#: RubyIndexer::Index
|
|
31
|
-
attr_reader :index
|
|
32
|
-
|
|
33
30
|
#: Rubydex::Graph
|
|
34
31
|
attr_reader :graph
|
|
35
32
|
|
|
@@ -60,7 +57,6 @@ module RubyLsp
|
|
|
60
57
|
@linters = [] #: Array[String]
|
|
61
58
|
@test_library = "minitest" #: String
|
|
62
59
|
@has_type_checker = true #: bool
|
|
63
|
-
@index = RubyIndexer::Index.new #: RubyIndexer::Index
|
|
64
60
|
@graph = Rubydex::Graph.new #: Rubydex::Graph
|
|
65
61
|
@supported_formatters = {} #: Hash[String, Requests::Support::Formatter]
|
|
66
62
|
@type_inferrer = TypeInferrer.new(@graph) #: TypeInferrer
|
|
@@ -206,7 +202,6 @@ module RubyLsp
|
|
|
206
202
|
@graph.encoding = "utf32"
|
|
207
203
|
Encoding::UTF_32LE
|
|
208
204
|
end
|
|
209
|
-
@index.configuration.encoding = @encoding
|
|
210
205
|
|
|
211
206
|
@client_capabilities.apply_client_capabilities(options[:capabilities]) if options[:capabilities]
|
|
212
207
|
|
data/lib/ruby_lsp/internal.rb
CHANGED
|
@@ -35,10 +35,11 @@ require "set"
|
|
|
35
35
|
require "ruby_lsp/rubydex/declaration"
|
|
36
36
|
require "ruby_lsp/rubydex/definition"
|
|
37
37
|
require "ruby_lsp/rubydex/reference"
|
|
38
|
+
require "ruby_lsp/rubydex/signature"
|
|
38
39
|
|
|
39
40
|
require "ruby-lsp"
|
|
40
41
|
require "ruby_lsp/base_server"
|
|
41
|
-
require "
|
|
42
|
+
require "ruby_lsp/uri"
|
|
42
43
|
require "ruby_lsp/utils"
|
|
43
44
|
require "ruby_lsp/scope"
|
|
44
45
|
require "ruby_lsp/client_capabilities"
|