ruby-lsp 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +6 -0
  3. data/.rubocop.yml +16 -0
  4. data/CHANGELOG.md +13 -0
  5. data/Gemfile +8 -5
  6. data/Gemfile.lock +55 -10
  7. data/README.md +40 -0
  8. data/VERSION +1 -1
  9. data/bin/tapioca +29 -0
  10. data/dev.yml +3 -0
  11. data/exe/ruby-lsp +19 -4
  12. data/lib/internal.rb +7 -0
  13. data/lib/ruby-lsp.rb +1 -0
  14. data/lib/ruby_lsp/cli.rb +12 -5
  15. data/lib/ruby_lsp/document.rb +37 -14
  16. data/lib/ruby_lsp/handler.rb +78 -23
  17. data/lib/ruby_lsp/requests/base_request.rb +11 -0
  18. data/lib/ruby_lsp/requests/code_actions.rb +1 -0
  19. data/lib/ruby_lsp/requests/diagnostics.rb +1 -0
  20. data/lib/ruby_lsp/requests/document_highlight.rb +96 -0
  21. data/lib/ruby_lsp/requests/document_symbol.rb +1 -10
  22. data/lib/ruby_lsp/requests/folding_ranges.rb +3 -2
  23. data/lib/ruby_lsp/requests/formatting.rb +2 -1
  24. data/lib/ruby_lsp/requests/rubocop_request.rb +1 -0
  25. data/lib/ruby_lsp/requests/selection_ranges.rb +1 -0
  26. data/lib/ruby_lsp/requests/semantic_highlighting.rb +17 -3
  27. data/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb +1 -0
  28. data/lib/ruby_lsp/requests/support/selection_range.rb +1 -0
  29. data/lib/ruby_lsp/requests/support/semantic_token_encoder.rb +12 -1
  30. data/lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb +1 -0
  31. data/lib/ruby_lsp/requests.rb +2 -0
  32. data/lib/ruby_lsp/store.rb +19 -3
  33. data/rakelib/check_docs.rake +4 -1
  34. data/ruby-lsp.gemspec +1 -0
  35. data/sorbet/config +4 -0
  36. data/sorbet/rbi/.rubocop.yml +8 -0
  37. data/sorbet/rbi/gems/ansi@1.5.0.rbi +338 -0
  38. data/sorbet/rbi/gems/ast@2.4.2.rbi +522 -0
  39. data/sorbet/rbi/gems/builder@3.2.4.rbi +418 -0
  40. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  41. data/sorbet/rbi/gems/debug@1.5.0.rbi +1273 -0
  42. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +867 -0
  43. data/sorbet/rbi/gems/io-console@0.5.11.rbi +8 -0
  44. data/sorbet/rbi/gems/irb@1.4.1.rbi +376 -0
  45. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +7325 -0
  46. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  47. data/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi +612 -0
  48. data/sorbet/rbi/gems/minitest@5.15.0.rbi +994 -0
  49. data/sorbet/rbi/gems/parallel@1.22.1.rbi +163 -0
  50. data/sorbet/rbi/gems/parser@3.1.2.0.rbi +3968 -0
  51. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +734 -0
  52. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  53. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +227 -0
  54. data/sorbet/rbi/gems/rake@13.0.6.rbi +1853 -0
  55. data/sorbet/rbi/gems/rbi@0.0.14.rbi +2337 -0
  56. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +1854 -0
  57. data/sorbet/rbi/gems/reline@0.3.1.rbi +1274 -0
  58. data/sorbet/rbi/gems/rexml@3.2.5.rbi +3852 -0
  59. data/sorbet/rbi/gems/rubocop-ast@1.18.0.rbi +4180 -0
  60. data/sorbet/rbi/gems/rubocop-minitest@0.20.0.rbi +1369 -0
  61. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +246 -0
  62. data/sorbet/rbi/gems/rubocop-shopify@2.6.0.rbi +8 -0
  63. data/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi +652 -0
  64. data/sorbet/rbi/gems/rubocop@1.30.0.rbi +36729 -0
  65. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +732 -0
  66. data/sorbet/rbi/gems/spoom@1.1.11.rbi +1600 -0
  67. data/sorbet/rbi/gems/syntax_tree@2.7.1.rbi +6777 -0
  68. data/sorbet/rbi/gems/tapioca@0.8.1.rbi +1972 -0
  69. data/sorbet/rbi/gems/thor@1.2.1.rbi +2921 -0
  70. data/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi +27 -0
  71. data/sorbet/rbi/gems/unparser@0.6.5.rbi +2789 -0
  72. data/sorbet/rbi/gems/webrick@1.7.0.rbi +1779 -0
  73. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +289 -0
  74. data/sorbet/rbi/gems/yard@0.9.27.rbi +13048 -0
  75. data/sorbet/rbi/shims/fiddle.rbi +4 -0
  76. data/sorbet/rbi/shims/hash.rbi +6 -0
  77. data/sorbet/rbi/shims/rdoc.rbi +4 -0
  78. data/sorbet/tapioca/config.yml +13 -0
  79. data/sorbet/tapioca/require.rb +7 -0
  80. metadata +64 -2
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `pry` gem.
5
+ # Please instead update this file by running `bin/tapioca gem pry`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires
@@ -0,0 +1,227 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rainbow` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rainbow`.
6
+
7
+ module Rainbow
8
+ class << self
9
+ def enabled; end
10
+ def enabled=(value); end
11
+ def global; end
12
+ def new; end
13
+ def uncolor(string); end
14
+ end
15
+ end
16
+
17
+ class Rainbow::Color
18
+ # Returns the value of attribute ground.
19
+ def ground; end
20
+
21
+ class << self
22
+ def build(ground, values); end
23
+ def parse_hex_color(hex); end
24
+ end
25
+ end
26
+
27
+ class Rainbow::Color::Indexed < ::Rainbow::Color
28
+ # @return [Indexed] a new instance of Indexed
29
+ def initialize(ground, num); end
30
+
31
+ def codes; end
32
+
33
+ # Returns the value of attribute num.
34
+ def num; end
35
+ end
36
+
37
+ class Rainbow::Color::Named < ::Rainbow::Color::Indexed
38
+ # @return [Named] a new instance of Named
39
+ def initialize(ground, name); end
40
+
41
+ class << self
42
+ def color_names; end
43
+ def valid_names; end
44
+ end
45
+ end
46
+
47
+ Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash)
48
+
49
+ class Rainbow::Color::RGB < ::Rainbow::Color::Indexed
50
+ # @return [RGB] a new instance of RGB
51
+ def initialize(ground, *values); end
52
+
53
+ # Returns the value of attribute b.
54
+ def b; end
55
+
56
+ def codes; end
57
+
58
+ # Returns the value of attribute g.
59
+ def g; end
60
+
61
+ # Returns the value of attribute r.
62
+ def r; end
63
+
64
+ private
65
+
66
+ def code_from_rgb; end
67
+
68
+ class << self
69
+ def to_ansi_domain(value); end
70
+ end
71
+ end
72
+
73
+ class Rainbow::Color::X11Named < ::Rainbow::Color::RGB
74
+ include ::Rainbow::X11ColorNames
75
+
76
+ # @return [X11Named] a new instance of X11Named
77
+ def initialize(ground, name); end
78
+
79
+ class << self
80
+ def color_names; end
81
+ def valid_names; end
82
+ end
83
+ end
84
+
85
+ class Rainbow::NullPresenter < ::String
86
+ def background(*_values); end
87
+ def bg(*_values); end
88
+ def black; end
89
+ def blink; end
90
+ def blue; end
91
+ def bold; end
92
+ def bright; end
93
+ def color(*_values); end
94
+ def cross_out; end
95
+ def cyan; end
96
+ def dark; end
97
+ def faint; end
98
+ def fg(*_values); end
99
+ def foreground(*_values); end
100
+ def green; end
101
+ def hide; end
102
+ def inverse; end
103
+ def italic; end
104
+ def magenta; end
105
+ def method_missing(method_name, *args); end
106
+ def red; end
107
+ def reset; end
108
+ def strike; end
109
+ def underline; end
110
+ def white; end
111
+ def yellow; end
112
+
113
+ private
114
+
115
+ # @return [Boolean]
116
+ def respond_to_missing?(method_name, *args); end
117
+ end
118
+
119
+ class Rainbow::Presenter < ::String
120
+ # Sets background color of this text.
121
+ def background(*values); end
122
+
123
+ # Sets background color of this text.
124
+ def bg(*values); end
125
+
126
+ def black; end
127
+
128
+ # Turns on blinking attribute for this text (not well supported by terminal
129
+ # emulators).
130
+ def blink; end
131
+
132
+ def blue; end
133
+
134
+ # Turns on bright/bold for this text.
135
+ def bold; end
136
+
137
+ # Turns on bright/bold for this text.
138
+ def bright; end
139
+
140
+ # Sets color of this text.
141
+ def color(*values); end
142
+
143
+ def cross_out; end
144
+ def cyan; end
145
+
146
+ # Turns on faint/dark for this text (not well supported by terminal
147
+ # emulators).
148
+ def dark; end
149
+
150
+ # Turns on faint/dark for this text (not well supported by terminal
151
+ # emulators).
152
+ def faint; end
153
+
154
+ # Sets color of this text.
155
+ def fg(*values); end
156
+
157
+ # Sets color of this text.
158
+ def foreground(*values); end
159
+
160
+ def green; end
161
+
162
+ # Hides this text (set its color to the same as background).
163
+ def hide; end
164
+
165
+ # Inverses current foreground/background colors.
166
+ def inverse; end
167
+
168
+ # Turns on italic style for this text (not well supported by terminal
169
+ # emulators).
170
+ def italic; end
171
+
172
+ def magenta; end
173
+
174
+ # We take care of X11 color method call here.
175
+ # Such as #aqua, #ghostwhite.
176
+ def method_missing(method_name, *args); end
177
+
178
+ def red; end
179
+
180
+ # Resets terminal to default colors/backgrounds.
181
+ #
182
+ # It shouldn't be needed to use this method because all methods
183
+ # append terminal reset code to end of string.
184
+ def reset; end
185
+
186
+ def strike; end
187
+
188
+ # Turns on underline decoration for this text.
189
+ def underline; end
190
+
191
+ def white; end
192
+ def yellow; end
193
+
194
+ private
195
+
196
+ # @return [Boolean]
197
+ def respond_to_missing?(method_name, *args); end
198
+
199
+ def wrap_with_sgr(codes); end
200
+ end
201
+
202
+ Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash)
203
+
204
+ class Rainbow::StringUtils
205
+ class << self
206
+ def uncolor(string); end
207
+ def wrap_with_sgr(string, codes); end
208
+ end
209
+ end
210
+
211
+ class Rainbow::Wrapper
212
+ # @return [Wrapper] a new instance of Wrapper
213
+ def initialize(enabled = T.unsafe(nil)); end
214
+
215
+ # Returns the value of attribute enabled.
216
+ def enabled; end
217
+
218
+ # Sets the attribute enabled
219
+ #
220
+ # @param value the value to set the attribute enabled to.
221
+ def enabled=(_arg0); end
222
+
223
+ def wrap(string); end
224
+ end
225
+
226
+ module Rainbow::X11ColorNames; end
227
+ Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash)