ruby-lsp 0.0.1 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -16
- data/.github/pull_request_template.md +15 -0
- data/.github/workflows/ci.yml +31 -0
- data/.github/workflows/publish_docs.yml +32 -0
- data/.gitignore +9 -12
- data/.rubocop.yml +20 -2
- data/.vscode/settings.json +5 -0
- data/CHANGELOG.md +29 -0
- data/Gemfile +8 -4
- data/Gemfile.lock +76 -14
- data/README.md +69 -2
- data/Rakefile +5 -0
- data/VERSION +1 -1
- data/bin/tapioca +29 -0
- data/bin/test +7 -1
- data/dev.yml +7 -7
- data/exe/ruby-lsp +19 -2
- data/lib/internal.rb +7 -0
- data/lib/ruby-lsp.rb +4 -1
- data/lib/ruby_lsp/cli.rb +88 -0
- data/lib/ruby_lsp/document.rb +113 -0
- data/lib/ruby_lsp/handler.rb +236 -0
- data/lib/ruby_lsp/requests/base_request.rb +33 -0
- data/lib/ruby_lsp/requests/code_actions.rb +37 -0
- data/lib/ruby_lsp/requests/diagnostics.rb +37 -0
- data/lib/ruby_lsp/requests/document_highlight.rb +96 -0
- data/lib/ruby_lsp/requests/document_symbol.rb +216 -0
- data/lib/ruby_lsp/requests/folding_ranges.rb +213 -0
- data/lib/ruby_lsp/requests/formatting.rb +52 -0
- data/lib/ruby_lsp/requests/rubocop_request.rb +50 -0
- data/lib/ruby_lsp/requests/selection_ranges.rb +103 -0
- data/lib/ruby_lsp/requests/semantic_highlighting.rb +112 -0
- data/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb +88 -0
- data/lib/ruby_lsp/requests/support/selection_range.rb +17 -0
- data/lib/ruby_lsp/requests/support/semantic_token_encoder.rb +60 -0
- data/lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb +27 -0
- data/lib/ruby_lsp/requests.rb +24 -0
- data/lib/ruby_lsp/store.rb +59 -0
- data/rakelib/check_docs.rake +56 -0
- data/ruby-lsp.gemspec +5 -1
- data/{shipit.yml → shipit.production.yml} +0 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/.rubocop.yml +8 -0
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +338 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +522 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +418 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
- data/sorbet/rbi/gems/debug@1.5.0.rbi +1273 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +867 -0
- data/sorbet/rbi/gems/io-console@0.5.11.rbi +8 -0
- data/sorbet/rbi/gems/irb@1.4.1.rbi +376 -0
- data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +7325 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi +612 -0
- data/sorbet/rbi/gems/minitest@5.15.0.rbi +994 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +163 -0
- data/sorbet/rbi/gems/parser@3.1.2.0.rbi +3968 -0
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +734 -0
- data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +227 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +1853 -0
- data/sorbet/rbi/gems/rbi@0.0.14.rbi +2337 -0
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +1854 -0
- data/sorbet/rbi/gems/reline@0.3.1.rbi +1274 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +3852 -0
- data/sorbet/rbi/gems/rubocop-ast@1.18.0.rbi +4180 -0
- data/sorbet/rbi/gems/rubocop-minitest@0.20.0.rbi +1369 -0
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +246 -0
- data/sorbet/rbi/gems/rubocop-shopify@2.6.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi +652 -0
- data/sorbet/rbi/gems/rubocop@1.30.0.rbi +36729 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +732 -0
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +1600 -0
- data/sorbet/rbi/gems/syntax_tree@2.7.1.rbi +6777 -0
- data/sorbet/rbi/gems/tapioca@0.8.1.rbi +1972 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +2921 -0
- data/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi +27 -0
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +2789 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +1779 -0
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +289 -0
- data/sorbet/rbi/gems/yard@0.9.27.rbi +13048 -0
- data/sorbet/rbi/shims/fiddle.rbi +4 -0
- data/sorbet/rbi/shims/hash.rbi +6 -0
- data/sorbet/rbi/shims/rdoc.rbi +4 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +7 -0
- metadata +119 -9
- data/.vscode/launch.json +0 -19
- data/bin/package_extension +0 -5
- data/bin/style +0 -10
- data/lib/ruby/lsp/cli.rb +0 -37
- data/lib/ruby/lsp.rb +0 -3
@@ -0,0 +1,163 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `parallel` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem parallel`.
|
6
|
+
|
7
|
+
module Parallel
|
8
|
+
extend ::Parallel::ProcessorCount
|
9
|
+
|
10
|
+
class << self
|
11
|
+
# @return [Boolean]
|
12
|
+
def all?(*args, &block); end
|
13
|
+
|
14
|
+
# @return [Boolean]
|
15
|
+
def any?(*args, &block); end
|
16
|
+
|
17
|
+
def each(array, options = T.unsafe(nil), &block); end
|
18
|
+
def each_with_index(array, options = T.unsafe(nil), &block); end
|
19
|
+
def flat_map(*args, &block); end
|
20
|
+
def in_processes(options = T.unsafe(nil), &block); end
|
21
|
+
def in_threads(options = T.unsafe(nil)); end
|
22
|
+
def map(source, options = T.unsafe(nil), &block); end
|
23
|
+
def map_with_index(array, options = T.unsafe(nil), &block); end
|
24
|
+
def worker_number; end
|
25
|
+
|
26
|
+
# TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
|
27
|
+
def worker_number=(worker_num); end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def add_progress_bar!(job_factory, options); end
|
32
|
+
def call_with_index(item, index, options, &block); end
|
33
|
+
def create_workers(job_factory, options, &block); end
|
34
|
+
|
35
|
+
# options is either a Integer or a Hash with :count
|
36
|
+
def extract_count_from_options(options); end
|
37
|
+
|
38
|
+
def instrument_finish(item, index, result, options); end
|
39
|
+
def instrument_start(item, index, options); end
|
40
|
+
def process_incoming_jobs(read, write, job_factory, options, &block); end
|
41
|
+
def replace_worker(job_factory, workers, index, options, blk); end
|
42
|
+
def with_instrumentation(item, index, options); end
|
43
|
+
def work_direct(job_factory, options, &block); end
|
44
|
+
def work_in_processes(job_factory, options, &blk); end
|
45
|
+
def work_in_ractors(job_factory, options); end
|
46
|
+
def work_in_threads(job_factory, options, &block); end
|
47
|
+
def worker(job_factory, options, &block); end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class Parallel::Break < ::StandardError
|
52
|
+
# @return [Break] a new instance of Break
|
53
|
+
def initialize(value = T.unsafe(nil)); end
|
54
|
+
|
55
|
+
# Returns the value of attribute value.
|
56
|
+
def value; end
|
57
|
+
end
|
58
|
+
|
59
|
+
class Parallel::DeadWorker < ::StandardError; end
|
60
|
+
|
61
|
+
class Parallel::ExceptionWrapper
|
62
|
+
# @return [ExceptionWrapper] a new instance of ExceptionWrapper
|
63
|
+
def initialize(exception); end
|
64
|
+
|
65
|
+
# Returns the value of attribute exception.
|
66
|
+
def exception; end
|
67
|
+
end
|
68
|
+
|
69
|
+
class Parallel::JobFactory
|
70
|
+
# @return [JobFactory] a new instance of JobFactory
|
71
|
+
def initialize(source, mutex); end
|
72
|
+
|
73
|
+
def next; end
|
74
|
+
|
75
|
+
# generate item that is sent to workers
|
76
|
+
# just index is faster + less likely to blow up with unserializable errors
|
77
|
+
def pack(item, index); end
|
78
|
+
|
79
|
+
def size; end
|
80
|
+
|
81
|
+
# unpack item that is sent to workers
|
82
|
+
def unpack(data); end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
# @return [Boolean]
|
87
|
+
def producer?; end
|
88
|
+
|
89
|
+
def queue_wrapper(array); end
|
90
|
+
end
|
91
|
+
|
92
|
+
class Parallel::Kill < ::Parallel::Break; end
|
93
|
+
|
94
|
+
# TODO: inline this method into parallel.rb and kill physical_processor_count in next major release
|
95
|
+
module Parallel::ProcessorCount
|
96
|
+
# Number of physical processor cores on the current system.
|
97
|
+
def physical_processor_count; end
|
98
|
+
|
99
|
+
# Number of processors seen by the OS, used for process scheduling
|
100
|
+
def processor_count; end
|
101
|
+
end
|
102
|
+
|
103
|
+
Parallel::Stop = T.let(T.unsafe(nil), Object)
|
104
|
+
|
105
|
+
class Parallel::UndumpableException < ::StandardError
|
106
|
+
# @return [UndumpableException] a new instance of UndumpableException
|
107
|
+
def initialize(original); end
|
108
|
+
|
109
|
+
# Returns the value of attribute backtrace.
|
110
|
+
def backtrace; end
|
111
|
+
end
|
112
|
+
|
113
|
+
class Parallel::UserInterruptHandler
|
114
|
+
class << self
|
115
|
+
def kill(thing); end
|
116
|
+
|
117
|
+
# kill all these pids or threads if user presses Ctrl+c
|
118
|
+
def kill_on_ctrl_c(pids, options); end
|
119
|
+
|
120
|
+
private
|
121
|
+
|
122
|
+
def restore_interrupt(old, signal); end
|
123
|
+
def trap_interrupt(signal); end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol)
|
128
|
+
Parallel::VERSION = T.let(T.unsafe(nil), String)
|
129
|
+
Parallel::Version = T.let(T.unsafe(nil), String)
|
130
|
+
|
131
|
+
class Parallel::Worker
|
132
|
+
# @return [Worker] a new instance of Worker
|
133
|
+
def initialize(read, write, pid); end
|
134
|
+
|
135
|
+
# might be passed to started_processes and simultaneously closed by another thread
|
136
|
+
# when running in isolation mode, so we have to check if it is closed before closing
|
137
|
+
def close_pipes; end
|
138
|
+
|
139
|
+
# Returns the value of attribute pid.
|
140
|
+
def pid; end
|
141
|
+
|
142
|
+
# Returns the value of attribute read.
|
143
|
+
def read; end
|
144
|
+
|
145
|
+
def stop; end
|
146
|
+
|
147
|
+
# Returns the value of attribute thread.
|
148
|
+
def thread; end
|
149
|
+
|
150
|
+
# Sets the attribute thread
|
151
|
+
#
|
152
|
+
# @param value the value to set the attribute thread to.
|
153
|
+
def thread=(_arg0); end
|
154
|
+
|
155
|
+
def work(data); end
|
156
|
+
|
157
|
+
# Returns the value of attribute write.
|
158
|
+
def write; end
|
159
|
+
|
160
|
+
private
|
161
|
+
|
162
|
+
def wait; end
|
163
|
+
end
|