# File lib/ruby_lsp/listeners/document_highlight.rb, line 236defon_block_parameter_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end
on_call_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 180defon_call_node_enter(node)
returnunlessmatches?(node, [Prism::CallNode, Prism::DefNode])
add_highlight(Constant::DocumentHighlightKind::READ, node.location)
end
on_class_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 250defon_class_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES+CONSTANT_PATH_NODES+ [Prism::ClassNode])
add_highlight(Constant::DocumentHighlightKind::WRITE, node.constant_path.location)
end
on_class_variable_and_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 420defon_class_variable_and_write_node_enter(node)
returnunlessmatches?(node, CLASS_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_class_variable_operator_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 413defon_class_variable_operator_write_node_enter(node)
returnunlessmatches?(node, CLASS_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_class_variable_or_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 406defon_class_variable_or_write_node_enter(node)
returnunlessmatches?(node, CLASS_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_class_variable_read_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 292defon_class_variable_read_node_enter(node)
returnunlessmatches?(node, CLASS_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::READ, node.location)
end
on_class_variable_target_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 222defon_class_variable_target_node_enter(node)
returnunlessmatches?(node, CLASS_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end
on_class_variable_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 399defon_class_variable_write_node_enter(node)
returnunlessmatches?(node, CLASS_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_constant_and_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 476defon_constant_and_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_constant_operator_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 441defon_constant_operator_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_constant_or_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 434defon_constant_or_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_constant_path_and_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 320defon_constant_path_and_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_PATH_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location)
end
on_constant_path_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 271defon_constant_path_node_enter(node)
returnunlessmatches?(node, CONSTANT_PATH_NODES)
add_highlight(Constant::DocumentHighlightKind::READ, node.location)
end
on_constant_path_operator_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 327defon_constant_path_operator_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_PATH_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location)
end
on_constant_path_or_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 313defon_constant_path_or_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_PATH_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location)
end
on_constant_path_target_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 208defon_constant_path_target_node_enter(node)
returnunlessmatches?(node, CONSTANT_PATH_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end
on_constant_path_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 306defon_constant_path_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_PATH_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location)
end
on_constant_read_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 278defon_constant_read_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES)
add_highlight(Constant::DocumentHighlightKind::READ, node.location)
end
on_constant_target_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 215defon_constant_target_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end
on_constant_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 427defon_constant_write_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_def_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 187defon_def_node_enter(node)
returnunlessmatches?(node, [Prism::CallNode, Prism::DefNode])
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_global_variable_and_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 497defon_global_variable_and_write_node_enter(node)
returnunlessmatches?(node, GLOBAL_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
# File lib/ruby_lsp/listeners/document_highlight.rb, line 504defon_global_variable_operator_write_node_enter(node)
returnunlessmatches?(node, GLOBAL_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_global_variable_or_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 490defon_global_variable_or_write_node_enter(node)
returnunlessmatches?(node, GLOBAL_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_global_variable_read_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 299defon_global_variable_read_node_enter(node)
returnunlessmatches?(node, GLOBAL_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::READ, node.location)
end
on_global_variable_target_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 194defon_global_variable_target_node_enter(node)
returnunlessmatches?(node, GLOBAL_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end
on_global_variable_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 483defon_global_variable_write_node_enter(node)
returnunlessmatches?(node, GLOBAL_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_instance_variable_and_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 462defon_instance_variable_and_write_node_enter(node)
returnunlessmatches?(node, INSTANCE_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
# File lib/ruby_lsp/listeners/document_highlight.rb, line 469defon_instance_variable_operator_write_node_enter(node)
returnunlessmatches?(node, INSTANCE_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_instance_variable_or_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 455defon_instance_variable_or_write_node_enter(node)
returnunlessmatches?(node, INSTANCE_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_instance_variable_read_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 285defon_instance_variable_read_node_enter(node)
returnunlessmatches?(node, INSTANCE_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::READ, node.location)
end
on_instance_variable_target_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 201defon_instance_variable_target_node_enter(node)
returnunlessmatches?(node, INSTANCE_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end
on_instance_variable_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 448defon_instance_variable_write_node_enter(node)
returnunlessmatches?(node, INSTANCE_VARIABLE_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
# File lib/ruby_lsp/listeners/document_highlight.rb, line 378defon_local_variable_and_write_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_local_variable_operator_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 385defon_local_variable_operator_write_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_local_variable_or_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 392defon_local_variable_or_write_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_local_variable_read_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 264defon_local_variable_read_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::READ, node.location)
end
on_local_variable_target_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 229defon_local_variable_target_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end
on_local_variable_write_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 334defon_local_variable_write_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_module_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 257defon_module_node_enter(node)
returnunlessmatches?(node, CONSTANT_NODES+CONSTANT_PATH_NODES+ [Prism::ModuleNode])
add_highlight(Constant::DocumentHighlightKind::WRITE, node.constant_path.location)
end
on_optional_keyword_parameter_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 348defon_optional_keyword_parameter_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_optional_parameter_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 363defon_optional_parameter_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_required_keyword_parameter_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 341defon_required_keyword_parameter_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc)
end
on_required_parameter_node_enter(node)
# File lib/ruby_lsp/listeners/document_highlight.rb, line 243defon_required_parameter_node_enter(node)
returnunlessmatches?(node, LOCAL_NODES)
add_highlight(Constant::DocumentHighlightKind::WRITE, node.location)
end