ruby-lsp 0.13.1 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -0
- data/VERSION +1 -1
- data/lib/ruby_indexer/lib/ruby_indexer/configuration.rb +1 -1
- data/lib/ruby_indexer/lib/ruby_indexer/entry.rb +30 -1
- data/lib/ruby_lsp/check_docs.rb +3 -3
- data/lib/ruby_lsp/document.rb +15 -7
- data/lib/ruby_lsp/executor.rb +85 -226
- data/lib/ruby_lsp/listener.rb +1 -50
- data/lib/ruby_lsp/listeners/code_lens.rb +233 -0
- data/lib/ruby_lsp/listeners/completion.rb +275 -0
- data/lib/ruby_lsp/listeners/definition.rb +158 -0
- data/lib/ruby_lsp/listeners/document_highlight.rb +556 -0
- data/lib/ruby_lsp/listeners/document_link.rb +162 -0
- data/lib/ruby_lsp/listeners/document_symbol.rb +223 -0
- data/lib/ruby_lsp/listeners/folding_ranges.rb +271 -0
- data/lib/ruby_lsp/listeners/hover.rb +152 -0
- data/lib/ruby_lsp/listeners/inlay_hints.rb +80 -0
- data/lib/ruby_lsp/listeners/semantic_highlighting.rb +430 -0
- data/lib/ruby_lsp/listeners/signature_help.rb +74 -0
- data/lib/ruby_lsp/requests/code_action_resolve.rb +5 -5
- data/lib/ruby_lsp/requests/code_actions.rb +15 -6
- data/lib/ruby_lsp/requests/code_lens.rb +21 -221
- data/lib/ruby_lsp/requests/completion.rb +64 -246
- data/lib/ruby_lsp/requests/definition.rb +34 -147
- data/lib/ruby_lsp/requests/diagnostics.rb +17 -5
- data/lib/ruby_lsp/requests/document_highlight.rb +12 -536
- data/lib/ruby_lsp/requests/document_link.rb +11 -132
- data/lib/ruby_lsp/requests/document_symbol.rb +23 -210
- data/lib/ruby_lsp/requests/folding_ranges.rb +16 -252
- data/lib/ruby_lsp/requests/formatting.rb +4 -4
- data/lib/ruby_lsp/requests/hover.rb +48 -92
- data/lib/ruby_lsp/requests/inlay_hints.rb +23 -56
- data/lib/ruby_lsp/requests/on_type_formatting.rb +18 -6
- data/lib/ruby_lsp/requests/request.rb +17 -0
- data/lib/ruby_lsp/requests/selection_ranges.rb +4 -3
- data/lib/ruby_lsp/requests/semantic_highlighting.rb +21 -408
- data/lib/ruby_lsp/requests/show_syntax_tree.rb +5 -5
- data/lib/ruby_lsp/requests/signature_help.rb +87 -0
- data/lib/ruby_lsp/requests/support/common.rb +3 -2
- data/lib/ruby_lsp/requests/support/dependency_detector.rb +2 -0
- data/lib/ruby_lsp/requests/support/selection_range.rb +1 -1
- data/lib/ruby_lsp/requests/support/semantic_token_encoder.rb +2 -2
- data/lib/ruby_lsp/requests/workspace_symbol.rb +5 -4
- data/lib/ruby_lsp/requests.rb +3 -1
- data/lib/ruby_lsp/store.rb +1 -1
- data/lib/ruby_lsp/utils.rb +8 -0
- metadata +20 -8
- data/lib/ruby_lsp/requests/base_request.rb +0 -24
data/lib/ruby_lsp/store.rb
CHANGED
@@ -63,7 +63,7 @@ module RubyLsp
|
|
63
63
|
@state[uri.to_s] = document
|
64
64
|
end
|
65
65
|
|
66
|
-
sig { params(uri: URI::Generic, edits: T::Array[
|
66
|
+
sig { params(uri: URI::Generic, edits: T::Array[T::Hash[Symbol, T.untyped]], version: Integer).void }
|
67
67
|
def push_edits(uri:, edits:, version:)
|
68
68
|
T.must(@state[uri.to_s]).push_edits(edits, version: version)
|
69
69
|
end
|
data/lib/ruby_lsp/utils.rb
CHANGED
@@ -12,6 +12,14 @@ module RubyLsp
|
|
12
12
|
end,
|
13
13
|
T.nilable(String),
|
14
14
|
)
|
15
|
+
GEMFILE_NAME = T.let(
|
16
|
+
begin
|
17
|
+
Bundler.with_original_env { Bundler.default_gemfile.basename.to_s }
|
18
|
+
rescue Bundler::GemfileNotFound
|
19
|
+
"Gemfile"
|
20
|
+
end,
|
21
|
+
String,
|
22
|
+
)
|
15
23
|
|
16
24
|
# A notification to be sent to the client
|
17
25
|
class Message
|
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.13.
|
4
|
+
version: 0.13.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: language_server-protocol
|
@@ -30,20 +30,20 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.19.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '0.
|
36
|
+
version: '0.20'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.19.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
46
|
+
version: '0.20'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sorbet-runtime
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,9 +98,19 @@ files:
|
|
98
98
|
- lib/ruby_lsp/executor.rb
|
99
99
|
- lib/ruby_lsp/internal.rb
|
100
100
|
- lib/ruby_lsp/listener.rb
|
101
|
+
- lib/ruby_lsp/listeners/code_lens.rb
|
102
|
+
- lib/ruby_lsp/listeners/completion.rb
|
103
|
+
- lib/ruby_lsp/listeners/definition.rb
|
104
|
+
- lib/ruby_lsp/listeners/document_highlight.rb
|
105
|
+
- lib/ruby_lsp/listeners/document_link.rb
|
106
|
+
- lib/ruby_lsp/listeners/document_symbol.rb
|
107
|
+
- lib/ruby_lsp/listeners/folding_ranges.rb
|
108
|
+
- lib/ruby_lsp/listeners/hover.rb
|
109
|
+
- lib/ruby_lsp/listeners/inlay_hints.rb
|
110
|
+
- lib/ruby_lsp/listeners/semantic_highlighting.rb
|
111
|
+
- lib/ruby_lsp/listeners/signature_help.rb
|
101
112
|
- lib/ruby_lsp/parameter_scope.rb
|
102
113
|
- lib/ruby_lsp/requests.rb
|
103
|
-
- lib/ruby_lsp/requests/base_request.rb
|
104
114
|
- lib/ruby_lsp/requests/code_action_resolve.rb
|
105
115
|
- lib/ruby_lsp/requests/code_actions.rb
|
106
116
|
- lib/ruby_lsp/requests/code_lens.rb
|
@@ -115,9 +125,11 @@ files:
|
|
115
125
|
- lib/ruby_lsp/requests/hover.rb
|
116
126
|
- lib/ruby_lsp/requests/inlay_hints.rb
|
117
127
|
- lib/ruby_lsp/requests/on_type_formatting.rb
|
128
|
+
- lib/ruby_lsp/requests/request.rb
|
118
129
|
- lib/ruby_lsp/requests/selection_ranges.rb
|
119
130
|
- lib/ruby_lsp/requests/semantic_highlighting.rb
|
120
131
|
- lib/ruby_lsp/requests/show_syntax_tree.rb
|
132
|
+
- lib/ruby_lsp/requests/signature_help.rb
|
121
133
|
- lib/ruby_lsp/requests/support/annotation.rb
|
122
134
|
- lib/ruby_lsp/requests/support/common.rb
|
123
135
|
- lib/ruby_lsp/requests/support/dependency_detector.rb
|
@@ -157,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
169
|
- !ruby/object:Gem::Version
|
158
170
|
version: '0'
|
159
171
|
requirements: []
|
160
|
-
rubygems_version: 3.4
|
172
|
+
rubygems_version: 3.5.4
|
161
173
|
signing_key:
|
162
174
|
specification_version: 4
|
163
175
|
summary: An opinionated language server for Ruby
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# typed: strict
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module RubyLsp
|
5
|
-
module Requests
|
6
|
-
# :nodoc:
|
7
|
-
class BaseRequest < Prism::Visitor
|
8
|
-
extend T::Sig
|
9
|
-
extend T::Helpers
|
10
|
-
include Support::Common
|
11
|
-
|
12
|
-
abstract!
|
13
|
-
|
14
|
-
sig { params(document: Document).void }
|
15
|
-
def initialize(document)
|
16
|
-
@document = document
|
17
|
-
super()
|
18
|
-
end
|
19
|
-
|
20
|
-
sig { abstract.returns(Object) }
|
21
|
-
def run; end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|