class RubyLsp::Phlex::IndexingEnhancement
def on_call_node_enter(node)
def on_call_node_enter(node) name = node.name owner = @listener.current_owner location = node.location arguments = node.arguments&.arguments return unless owner return unless :register_element == name case arguments in [Prism::SymbolNode[unescaped: String => method_name], *] tag_name = method_name.tr("_", "-") arguments[1] in Prism::StringNode[unescaped: String => tag_name] @listener.add_method(method_name, location, [ RubyIndexer::Entry::Signature.new([ RubyIndexer::Entry::KeywordRestParameter.new(name: :attributes), RubyIndexer::Entry::BlockParameter.new(name: :content), ]), ], visibility: :public, comments: "Outputs a `<#{tag_name}>` tag.") end end