Skip to content

Commit

Permalink
Stub behavior for typeHierarchy/subtypes requests
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
  • Loading branch information
Morriar committed May 29, 2024
1 parent bf6381a commit 164f92b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/ruby_lsp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def process_message(message)
text_document_prepare_type_hierarchy(message)
when "typeHierarchy/supertypes"
type_hierarchy_supertypes(message)
when "typeHierarchy/subtypes"
type_hierarchy_subtypes(message)
when "workspace/didChangeWatchedFiles"
workspace_did_change_watched_files(message)
when "workspace/symbol"
Expand Down Expand Up @@ -687,6 +689,13 @@ def type_hierarchy_supertypes(message)
send_message(Result.new(id: message[:id], response: response))
end

sig { params(message: T::Hash[Symbol, T.untyped]).void }
def type_hierarchy_subtypes(message)
# TODO: implement subtypes
# The current index representation doesn't allow us to find the children of an entry.
send_message(Result.new(id: message[:id], response: nil))
end

sig { params(message: T::Hash[Symbol, T.untyped]).void }
def workspace_dependencies(message)
response = begin
Expand Down

0 comments on commit 164f92b

Please sign in to comment.