From 768b8c60405ac149de5b478ebd69d2da421b5928 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Wed, 16 Aug 2023 14:56:12 -0400 Subject: [PATCH] Fix naming --- lib/ruby_lsp/event_emitter.rb | 4 ++-- lib/ruby_lsp/requests/document_symbol.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ruby_lsp/event_emitter.rb b/lib/ruby_lsp/event_emitter.rb index c94529625..99c91b5b4 100644 --- a/lib/ruby_lsp/event_emitter.rb +++ b/lib/ruby_lsp/event_emitter.rb @@ -77,13 +77,13 @@ def visit_call_node(node) sig { override.params(node: YARP::ConstantPathWriteNode).void } def visit_constant_path_write_node(node) - @listeners[:on_constant_path_write_node]&.each { |l| T.unsafe(l).on_constant_path_write_node(node) } + @listeners[:on_constant_path_write]&.each { |l| T.unsafe(l).on_constant_path_write(node) } super end sig { override.params(node: YARP::ConstantWriteNode).void } def visit_constant_write_node(node) - @listeners[:on_constant_write_node]&.each { |l| T.unsafe(l).on_constant_write_node(node) } + @listeners[:on_constant_write]&.each { |l| T.unsafe(l).on_constant_write(node) } super end diff --git a/lib/ruby_lsp/requests/document_symbol.rb b/lib/ruby_lsp/requests/document_symbol.rb index c2e45e12f..189ed8e71 100644 --- a/lib/ruby_lsp/requests/document_symbol.rb +++ b/lib/ruby_lsp/requests/document_symbol.rb @@ -97,8 +97,8 @@ def initialize(emitter, message_queue) :on_class, :after_class, :on_call, - :on_constant_path_write_node, - :on_constant_write_node, + :on_constant_path_write, + :on_constant_write, :on_def, :after_def, :on_module, @@ -143,7 +143,7 @@ def on_call(node) end sig { params(node: YARP::ConstantPathWriteNode).void } - def on_constant_path_write_node(node) + def on_constant_path_write(node) create_document_symbol( name: node.target.location.slice, kind: :constant, @@ -153,7 +153,7 @@ def on_constant_path_write_node(node) end sig { params(node: YARP::ConstantWriteNode).void } - def on_constant_write_node(node) + def on_constant_write(node) create_document_symbol( name: node.name, kind: :constant,