solargraph 0.47.2 → 0.54.0
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/.github/FUNDING.yml +1 -0
- data/.github/workflows/plugins.yml +40 -0
- data/.github/workflows/rspec.yml +4 -8
- data/.github/workflows/typecheck.yml +34 -0
- data/.yardopts +2 -2
- data/CHANGELOG.md +166 -3
- data/LICENSE +1 -1
- data/README.md +19 -16
- data/SPONSORS.md +2 -9
- data/lib/solargraph/api_map/cache.rb +50 -20
- data/lib/solargraph/api_map/source_to_yard.rb +17 -10
- data/lib/solargraph/api_map/store.rb +68 -15
- data/lib/solargraph/api_map.rb +238 -112
- data/lib/solargraph/bench.rb +3 -2
- data/lib/solargraph/cache.rb +77 -0
- data/lib/solargraph/complex_type/type_methods.rb +116 -35
- data/lib/solargraph/complex_type/unique_type.rb +261 -33
- data/lib/solargraph/complex_type.rb +149 -30
- data/lib/solargraph/convention/rakefile.rb +17 -0
- data/lib/solargraph/convention.rb +2 -3
- data/lib/solargraph/converters/dd.rb +5 -0
- data/lib/solargraph/converters/dl.rb +3 -0
- data/lib/solargraph/converters/dt.rb +3 -0
- data/lib/solargraph/diagnostics/rubocop.rb +23 -8
- data/lib/solargraph/diagnostics/rubocop_helpers.rb +4 -1
- data/lib/solargraph/diagnostics/type_check.rb +1 -0
- data/lib/solargraph/diagnostics.rb +2 -2
- data/lib/solargraph/doc_map.rb +187 -0
- data/lib/solargraph/gem_pins.rb +72 -0
- data/lib/solargraph/language_server/host/diagnoser.rb +2 -2
- data/lib/solargraph/language_server/host/dispatch.rb +22 -5
- data/lib/solargraph/language_server/host/message_worker.rb +4 -0
- data/lib/solargraph/language_server/host/sources.rb +8 -65
- data/lib/solargraph/language_server/host.rb +88 -93
- data/lib/solargraph/language_server/message/base.rb +1 -1
- data/lib/solargraph/language_server/message/completion_item/resolve.rb +3 -1
- data/lib/solargraph/language_server/message/extended/check_gem_version.rb +13 -1
- data/lib/solargraph/language_server/message/extended/download_core.rb +1 -5
- data/lib/solargraph/language_server/message/initialize.rb +27 -0
- data/lib/solargraph/language_server/message/initialized.rb +1 -0
- data/lib/solargraph/language_server/message/text_document/document_symbol.rb +4 -1
- data/lib/solargraph/language_server/message/text_document/formatting.rb +5 -4
- data/lib/solargraph/language_server/message/text_document/hover.rb +2 -0
- data/lib/solargraph/language_server/message/text_document/signature_help.rb +1 -6
- data/lib/solargraph/language_server/message/text_document/type_definition.rb +24 -0
- data/lib/solargraph/language_server/message/text_document.rb +1 -1
- data/lib/solargraph/language_server/message/workspace/did_change_configuration.rb +5 -0
- data/lib/solargraph/language_server/message/workspace/did_change_watched_files.rb +10 -3
- data/lib/solargraph/language_server/message.rb +1 -0
- data/lib/solargraph/language_server/progress.rb +118 -0
- data/lib/solargraph/language_server/transport/adapter.rb +16 -1
- data/lib/solargraph/language_server/transport/data_reader.rb +2 -0
- data/lib/solargraph/language_server.rb +1 -0
- data/lib/solargraph/library.rb +231 -104
- data/lib/solargraph/location.rb +1 -0
- data/lib/solargraph/page.rb +6 -0
- data/lib/solargraph/parser/comment_ripper.rb +4 -0
- data/lib/solargraph/parser/node_methods.rb +47 -7
- data/lib/solargraph/parser/node_processor/base.rb +11 -1
- data/lib/solargraph/parser/node_processor.rb +1 -0
- data/lib/solargraph/parser/{legacy → parser_gem}/class_methods.rb +31 -9
- data/lib/solargraph/parser/{legacy → parser_gem}/flawed_builder.rb +3 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_chainer.rb +57 -41
- data/lib/solargraph/parser/parser_gem/node_methods.rb +495 -0
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/alias_node.rb +1 -1
- data/lib/solargraph/parser/parser_gem/node_processors/args_node.rb +53 -0
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/begin_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/block_node.rb +3 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/casgn_node.rb +14 -4
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/cvasgn_node.rb +1 -1
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/def_node.rb +7 -20
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/defs_node.rb +2 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/gvasgn_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/ivasgn_node.rb +2 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/lvasgn_node.rb +2 -2
- data/lib/solargraph/parser/parser_gem/node_processors/masgn_node.rb +47 -0
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/namespace_node.rb +2 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/orasgn_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/resbody_node.rb +3 -3
- data/lib/solargraph/parser/parser_gem/node_processors/sclass_node.rb +42 -0
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/send_node.rb +7 -5
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/sym_node.rb +1 -1
- data/lib/solargraph/parser/parser_gem/node_processors.rb +56 -0
- data/lib/solargraph/parser/parser_gem.rb +12 -0
- data/lib/solargraph/parser/region.rb +1 -1
- data/lib/solargraph/parser/snippet.rb +2 -0
- data/lib/solargraph/parser.rb +9 -10
- data/lib/solargraph/pin/base.rb +69 -11
- data/lib/solargraph/pin/base_variable.rb +40 -7
- data/lib/solargraph/pin/block.rb +81 -33
- data/lib/solargraph/pin/closure.rb +17 -2
- data/lib/solargraph/pin/common.rb +7 -3
- data/lib/solargraph/pin/conversions.rb +34 -8
- data/lib/solargraph/pin/delegated_method.rb +101 -0
- data/lib/solargraph/pin/documenting.rb +25 -32
- data/lib/solargraph/pin/instance_variable.rb +4 -0
- data/lib/solargraph/pin/local_variable.rb +13 -1
- data/lib/solargraph/pin/method.rb +273 -17
- data/lib/solargraph/pin/namespace.rb +17 -1
- data/lib/solargraph/pin/parameter.rb +40 -28
- data/lib/solargraph/pin/reference/override.rb +2 -2
- data/lib/solargraph/pin/reference.rb +8 -0
- data/lib/solargraph/pin/search.rb +4 -4
- data/lib/solargraph/pin/signature.rb +143 -0
- data/lib/solargraph/pin.rb +2 -1
- data/lib/solargraph/range.rb +4 -6
- data/lib/solargraph/rbs_map/conversions.rb +607 -0
- data/lib/solargraph/rbs_map/core_fills.rb +50 -0
- data/lib/solargraph/rbs_map/core_map.rb +28 -0
- data/lib/solargraph/rbs_map/stdlib_map.rb +33 -0
- data/lib/solargraph/rbs_map.rb +92 -0
- data/lib/solargraph/shell.rb +85 -59
- data/lib/solargraph/source/chain/array.rb +32 -0
- data/lib/solargraph/source/chain/block_symbol.rb +13 -0
- data/lib/solargraph/source/chain/call.rb +125 -61
- data/lib/solargraph/source/chain/constant.rb +15 -1
- data/lib/solargraph/source/chain/if.rb +23 -0
- data/lib/solargraph/source/chain/link.rb +8 -2
- data/lib/solargraph/source/chain/or.rb +1 -1
- data/lib/solargraph/source/chain/z_super.rb +3 -3
- data/lib/solargraph/source/chain.rb +64 -14
- data/lib/solargraph/source/change.rb +3 -0
- data/lib/solargraph/source/cursor.rb +2 -0
- data/lib/solargraph/source/source_chainer.rb +8 -5
- data/lib/solargraph/source/updater.rb +1 -0
- data/lib/solargraph/source.rb +18 -63
- data/lib/solargraph/source_map/clip.rb +31 -23
- data/lib/solargraph/source_map/mapper.rb +23 -7
- data/lib/solargraph/source_map.rb +36 -11
- data/lib/solargraph/type_checker/checks.rb +10 -2
- data/lib/solargraph/type_checker.rb +229 -100
- data/lib/solargraph/version.rb +1 -1
- data/lib/solargraph/views/environment.erb +2 -2
- data/lib/solargraph/workspace/config.rb +15 -11
- data/lib/solargraph/workspace.rb +41 -17
- data/lib/solargraph/yard_map/cache.rb +6 -0
- data/lib/solargraph/yard_map/helpers.rb +1 -1
- data/lib/solargraph/yard_map/mapper/to_method.rb +23 -7
- data/lib/solargraph/yard_map/mapper.rb +1 -1
- data/lib/solargraph/yard_map/to_method.rb +11 -4
- data/lib/solargraph/yard_map.rb +1 -443
- data/lib/solargraph/yard_tags.rb +20 -0
- data/lib/solargraph/yardoc.rb +52 -0
- data/lib/solargraph.rb +8 -6
- data/solargraph.gemspec +19 -8
- metadata +164 -99
- data/.travis.yml +0 -19
- data/lib/solargraph/api_map/bundler_methods.rb +0 -22
- data/lib/solargraph/compat.rb +0 -37
- data/lib/solargraph/convention/rspec.rb +0 -30
- data/lib/solargraph/documentor.rb +0 -76
- data/lib/solargraph/language_server/host/cataloger.rb +0 -56
- data/lib/solargraph/parser/legacy/node_methods.rb +0 -325
- data/lib/solargraph/parser/legacy/node_processors/alias_node.rb +0 -23
- data/lib/solargraph/parser/legacy/node_processors/args_node.rb +0 -35
- data/lib/solargraph/parser/legacy/node_processors/begin_node.rb +0 -15
- data/lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb +0 -23
- data/lib/solargraph/parser/legacy/node_processors/def_node.rb +0 -63
- data/lib/solargraph/parser/legacy/node_processors/sclass_node.rb +0 -21
- data/lib/solargraph/parser/legacy/node_processors.rb +0 -54
- data/lib/solargraph/parser/legacy.rb +0 -12
- data/lib/solargraph/parser/rubyvm/class_methods.rb +0 -144
- data/lib/solargraph/parser/rubyvm/node_chainer.rb +0 -160
- data/lib/solargraph/parser/rubyvm/node_methods.rb +0 -315
- data/lib/solargraph/parser/rubyvm/node_processors/args_node.rb +0 -85
- data/lib/solargraph/parser/rubyvm/node_processors/block_node.rb +0 -42
- data/lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb +0 -22
- data/lib/solargraph/parser/rubyvm/node_processors/defs_node.rb +0 -57
- data/lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb +0 -23
- data/lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb +0 -38
- data/lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb +0 -39
- data/lib/solargraph/parser/rubyvm/node_processors/lit_node.rb +0 -20
- data/lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb +0 -27
- data/lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb +0 -39
- data/lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb +0 -26
- data/lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb +0 -15
- data/lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb +0 -45
- data/lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb +0 -21
- data/lib/solargraph/parser/rubyvm/node_processors/scope_node.rb +0 -15
- data/lib/solargraph/parser/rubyvm/node_processors/send_node.rb +0 -277
- data/lib/solargraph/parser/rubyvm/node_processors/sym_node.rb +0 -18
- data/lib/solargraph/parser/rubyvm/node_processors.rb +0 -63
- data/lib/solargraph/parser/rubyvm.rb +0 -40
- data/lib/solargraph/yard_map/core_docs.rb +0 -170
- data/lib/solargraph/yard_map/core_fills.rb +0 -208
- data/lib/solargraph/yard_map/core_gen.rb +0 -76
- data/lib/solargraph/yard_map/rdoc_to_yard.rb +0 -140
- data/lib/solargraph/yard_map/stdlib_fills.rb +0 -43
- data/lib/yard-solargraph.rb +0 -33
- data/yardoc/2.2.2.tar.gz +0 -0
@@ -12,9 +12,9 @@ module Solargraph
|
|
12
12
|
autoload :DidSave, 'solargraph/language_server/message/text_document/did_save'
|
13
13
|
autoload :Hover, 'solargraph/language_server/message/text_document/hover'
|
14
14
|
autoload :SignatureHelp, 'solargraph/language_server/message/text_document/signature_help'
|
15
|
-
autoload :DiagnosticsQueue, 'solargraph/language_server/message/text_document/diagnostics_queue'
|
16
15
|
autoload :OnTypeFormatting, 'solargraph/language_server/message/text_document/on_type_formatting'
|
17
16
|
autoload :Definition, 'solargraph/language_server/message/text_document/definition'
|
17
|
+
autoload :TypeDefinition, 'solargraph/language_server/message/text_document/type_definition'
|
18
18
|
autoload :DocumentSymbol, 'solargraph/language_server/message/text_document/document_symbol'
|
19
19
|
autoload :Formatting, 'solargraph/language_server/message/text_document/formatting'
|
20
20
|
autoload :References, 'solargraph/language_server/message/text_document/references'
|
@@ -11,8 +11,12 @@ module Solargraph::LanguageServer::Message::Workspace
|
|
11
11
|
|
12
12
|
private
|
13
13
|
|
14
|
+
# @return [void]
|
14
15
|
def register_from_options
|
16
|
+
Solargraph.logger.debug "Registering capabilities from options: #{host.options.inspect}"
|
17
|
+
# @type [Array<String>]
|
15
18
|
y = []
|
19
|
+
# @type [Array<String>]
|
16
20
|
n = []
|
17
21
|
(host.options['completion'] ? y : n).push('textDocument/completion')
|
18
22
|
(host.options['hover'] ? y : n).push('textDocument/hover', 'textDocument/signatureHelp')
|
@@ -20,6 +24,7 @@ module Solargraph::LanguageServer::Message::Workspace
|
|
20
24
|
(host.options['formatting'] ? y : n).push('textDocument/formatting')
|
21
25
|
(host.options['symbols'] ? y : n).push('textDocument/documentSymbol', 'workspace/symbol')
|
22
26
|
(host.options['definitions'] ? y : n).push('textDocument/definition')
|
27
|
+
(host.options['typeDefinitions'] ? y : n).push('textDocument/typeDefinition')
|
23
28
|
(host.options['references'] ? y : n).push('textDocument/references')
|
24
29
|
(host.options['folding'] ? y : n).push('textDocument/folding')
|
25
30
|
(host.options['highlights'] ? y : n).push('textDocument/documentHighlight')
|
@@ -10,22 +10,29 @@ module Solargraph::LanguageServer::Message::Workspace
|
|
10
10
|
|
11
11
|
def process
|
12
12
|
need_catalog = false
|
13
|
+
to_create = []
|
14
|
+
to_delete = []
|
15
|
+
|
13
16
|
# @param change [Hash]
|
14
17
|
params['changes'].each do |change|
|
15
18
|
if change['type'] == CREATED
|
16
|
-
|
19
|
+
to_create << change['uri']
|
17
20
|
need_catalog = true
|
18
21
|
elsif change['type'] == CHANGED
|
19
22
|
next if host.open?(change['uri'])
|
20
|
-
|
23
|
+
to_create << change['uri']
|
21
24
|
need_catalog = true
|
22
25
|
elsif change['type'] == DELETED
|
23
|
-
|
26
|
+
to_delete << change['uri']
|
24
27
|
need_catalog = true
|
25
28
|
else
|
26
29
|
set_error Solargraph::LanguageServer::ErrorCodes::INVALID_PARAMS, "Unknown change type ##{change['type']} for #{uri_to_file(change['uri'])}"
|
27
30
|
end
|
28
31
|
end
|
32
|
+
|
33
|
+
host.create *to_create
|
34
|
+
host.delete *to_delete
|
35
|
+
|
29
36
|
# Force host to catalog libraries after file changes (see castwide/solargraph#139)
|
30
37
|
host.catalog if need_catalog
|
31
38
|
end
|
@@ -66,6 +66,7 @@ module Solargraph
|
|
66
66
|
register 'textDocument/didClose', TextDocument::DidClose
|
67
67
|
register 'textDocument/hover', TextDocument::Hover
|
68
68
|
register 'textDocument/definition', TextDocument::Definition
|
69
|
+
register 'textDocument/typeDefinition', TextDocument::TypeDefinition
|
69
70
|
register 'textDocument/formatting', TextDocument::Formatting
|
70
71
|
register 'textDocument/onTypeFormatting', TextDocument::OnTypeFormatting
|
71
72
|
register 'textDocument/documentSymbol', TextDocument::DocumentSymbol
|
@@ -0,0 +1,118 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'securerandom'
|
4
|
+
|
5
|
+
module Solargraph
|
6
|
+
module LanguageServer
|
7
|
+
# Progress notification handling for language server hosts.
|
8
|
+
#
|
9
|
+
class Progress
|
10
|
+
WAITING = :waiting
|
11
|
+
CREATED = :created
|
12
|
+
FINISHED = :finished
|
13
|
+
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :uuid
|
16
|
+
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :title
|
19
|
+
|
20
|
+
# @return [String, nil]
|
21
|
+
attr_reader :kind
|
22
|
+
|
23
|
+
# @return [String, nil]
|
24
|
+
attr_reader :message
|
25
|
+
|
26
|
+
# @return [Integer]
|
27
|
+
attr_reader :percentage
|
28
|
+
|
29
|
+
# @return [Symbol]
|
30
|
+
attr_reader :status
|
31
|
+
|
32
|
+
# @param title [String]
|
33
|
+
def initialize title
|
34
|
+
@title = title
|
35
|
+
@uuid = SecureRandom.uuid
|
36
|
+
@percentage = 0
|
37
|
+
@status = WAITING
|
38
|
+
end
|
39
|
+
|
40
|
+
# @param message [String]
|
41
|
+
# @param percentage [Integer]
|
42
|
+
def begin message, percentage
|
43
|
+
@kind = 'begin'
|
44
|
+
@message = message
|
45
|
+
@percentage = percentage
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param message [String]
|
49
|
+
# @param percentage [Integer]
|
50
|
+
def report message, percentage
|
51
|
+
@kind = 'report'
|
52
|
+
@message = message
|
53
|
+
@percentage = percentage
|
54
|
+
end
|
55
|
+
|
56
|
+
# @param message [String]
|
57
|
+
def finish message
|
58
|
+
@kind = 'end'
|
59
|
+
@message = message
|
60
|
+
@percentage = 100
|
61
|
+
true
|
62
|
+
end
|
63
|
+
|
64
|
+
# @param host [Solargraph::LanguageServer::Host]
|
65
|
+
def send host
|
66
|
+
return unless host.client_supports_progress? && !finished?
|
67
|
+
|
68
|
+
message = build
|
69
|
+
|
70
|
+
create(host) unless created?
|
71
|
+
host.send_notification '$/progress', message
|
72
|
+
@status = FINISHED if kind == 'end'
|
73
|
+
end
|
74
|
+
|
75
|
+
def created?
|
76
|
+
[CREATED, FINISHED].include?(status)
|
77
|
+
end
|
78
|
+
|
79
|
+
def finished?
|
80
|
+
status == FINISHED
|
81
|
+
end
|
82
|
+
|
83
|
+
private
|
84
|
+
|
85
|
+
# @param host [Solargraph::LanguageServer::Host]
|
86
|
+
# @return [void]
|
87
|
+
def create host
|
88
|
+
return if created?
|
89
|
+
|
90
|
+
host.send_request 'window/workDoneProgress/create', { token: uuid }
|
91
|
+
@status = CREATED
|
92
|
+
end
|
93
|
+
|
94
|
+
def build
|
95
|
+
{
|
96
|
+
token: uuid,
|
97
|
+
value: {
|
98
|
+
kind: kind,
|
99
|
+
cancellable: false
|
100
|
+
}.merge(build_value)
|
101
|
+
}
|
102
|
+
end
|
103
|
+
|
104
|
+
def build_value
|
105
|
+
case kind
|
106
|
+
when 'begin'
|
107
|
+
{ title: title, message: message, percentage: percentage }
|
108
|
+
when 'report'
|
109
|
+
{ message: message, percentage: percentage }
|
110
|
+
when 'end'
|
111
|
+
{ message: message }
|
112
|
+
else
|
113
|
+
raise "Invalid progress kind #{kind}"
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -8,6 +8,17 @@ module Solargraph
|
|
8
8
|
# A common module for running language servers in Backport.
|
9
9
|
#
|
10
10
|
module Adapter
|
11
|
+
# This runs in the context of Backport::Adapter, which
|
12
|
+
# provides write() - but if we didn't hide this behind a parse
|
13
|
+
# tag, it would override the one in the class.
|
14
|
+
#
|
15
|
+
# @!method write(text)
|
16
|
+
# @abstract
|
17
|
+
# Write the change to the specified text.
|
18
|
+
# @param text [String] The text to be changed.
|
19
|
+
# @return [String] The updated text.
|
20
|
+
|
21
|
+
# @return [void]
|
11
22
|
def opening
|
12
23
|
@host = Solargraph::LanguageServer::Host.new
|
13
24
|
@host.add_observer self
|
@@ -18,15 +29,18 @@ module Solargraph
|
|
18
29
|
end
|
19
30
|
end
|
20
31
|
|
32
|
+
# @return [void]
|
21
33
|
def closing
|
22
34
|
@host.stop
|
23
35
|
end
|
24
36
|
|
25
37
|
# @param data [String]
|
38
|
+
# @return [void]
|
26
39
|
def receiving data
|
27
40
|
@data_reader.receive data
|
28
41
|
end
|
29
42
|
|
43
|
+
# @return [void]
|
30
44
|
def update
|
31
45
|
if @host.stopped?
|
32
46
|
shutdown
|
@@ -38,12 +52,13 @@ module Solargraph
|
|
38
52
|
|
39
53
|
private
|
40
54
|
|
41
|
-
# @param request [
|
55
|
+
# @param request [Hash]
|
42
56
|
# @return [void]
|
43
57
|
def process request
|
44
58
|
@host.process(request)
|
45
59
|
end
|
46
60
|
|
61
|
+
# @return [void]
|
47
62
|
def shutdown
|
48
63
|
Backport.stop unless @host.options['transport'] == 'external'
|
49
64
|
end
|
@@ -16,6 +16,7 @@ module Solargraph
|
|
16
16
|
# client.
|
17
17
|
#
|
18
18
|
# @yieldparam [Hash] The message received from the client
|
19
|
+
# @return [void]
|
19
20
|
def set_message_handler &block
|
20
21
|
@message_handler = block
|
21
22
|
end
|
@@ -26,6 +27,7 @@ module Solargraph
|
|
26
27
|
# will be buffered and subsequent data will be appended to the buffer.
|
27
28
|
#
|
28
29
|
# @param data [String]
|
30
|
+
# @return [void]
|
29
31
|
def receive data
|
30
32
|
data.each_char do |char|
|
31
33
|
@buffer.concat char
|
@@ -15,5 +15,6 @@ module Solargraph
|
|
15
15
|
autoload :MessageTypes, 'solargraph/language_server/message_types'
|
16
16
|
autoload :Request, 'solargraph/language_server/request'
|
17
17
|
autoload :Transport, 'solargraph/language_server/transport'
|
18
|
+
autoload :Progress, 'solargraph/language_server/progress'
|
18
19
|
end
|
19
20
|
end
|