@@ -56,7 +56,7 @@ class Completion
56
56
response_builder : ResponseBuilders ::CollectionResponseBuilder [ Interface ::CompletionItem ] ,
57
57
global_state : GlobalState ,
58
58
node_context : NodeContext ,
59
- sorbet_level : Document ::SorbetLevel ,
59
+ sorbet_level : RubyDocument ::SorbetLevel ,
60
60
dispatcher : Prism ::Dispatcher ,
61
61
uri : URI ::Generic ,
62
62
trigger_character : T . nilable ( String ) ,
@@ -99,7 +99,7 @@ def initialize( # rubocop:disable Metrics/ParameterLists
99
99
def on_constant_read_node_enter ( node )
100
100
# The only scenario where Sorbet doesn't provide constant completion is on ignored files. Even if the file has
101
101
# no sigil, Sorbet will still provide completion for constants
102
- return if @sorbet_level != Document ::SorbetLevel ::Ignore
102
+ return if @sorbet_level != RubyDocument ::SorbetLevel ::Ignore
103
103
104
104
name = constant_name ( node )
105
105
return if name . nil?
@@ -122,7 +122,7 @@ def on_constant_read_node_enter(node)
122
122
def on_constant_path_node_enter ( node )
123
123
# The only scenario where Sorbet doesn't provide constant completion is on ignored files. Even if the file has
124
124
# no sigil, Sorbet will still provide completion for constants
125
- return if @sorbet_level != Document ::SorbetLevel ::Ignore
125
+ return if @sorbet_level != RubyDocument ::SorbetLevel ::Ignore
126
126
127
127
name = constant_name ( node )
128
128
return if name . nil?
@@ -134,7 +134,7 @@ def on_constant_path_node_enter(node)
134
134
def on_call_node_enter ( node )
135
135
# The only scenario where Sorbet doesn't provide constant completion is on ignored files. Even if the file has
136
136
# no sigil, Sorbet will still provide completion for constants
137
- if @sorbet_level == Document ::SorbetLevel ::Ignore
137
+ if @sorbet_level == RubyDocument ::SorbetLevel ::Ignore
138
138
receiver = node . receiver
139
139
140
140
# When writing `Foo::`, the AST assigns a method call node (because you can use that syntax to invoke
@@ -257,7 +257,7 @@ def constant_path_completion(name, range)
257
257
def handle_instance_variable_completion ( name , location )
258
258
# Sorbet enforces that all instance variables be declared on typed strict or higher, which means it will be able
259
259
# to provide all features for them
260
- return if @sorbet_level == Document ::SorbetLevel ::Strict
260
+ return if @sorbet_level == RubyDocument ::SorbetLevel ::Strict
261
261
262
262
type = @type_inferrer . infer_receiver_type ( @node_context )
263
263
return unless type
0 commit comments