sig/steep/server/interaction_worker.rbs in steep-1.4.0.dev.2 vs sig/steep/server/interaction_worker.rbs in steep-1.4.0.dev.3
- old
+ new
@@ -1,41 +1,70 @@
+use LanguageServer::Protocol::Transport::Io::*, Thread::Queue, RBS::AST::Comment
+use Steep::Services::CompletionProvider, Steep::Services::TypeNameCompletion
+use RBS::TypeName, RBS::Namespace
+
module Steep
module Server
class InteractionWorker < BaseWorker
include ChangeBuffer
- ApplyChangeJob: untyped
+ class ApplyChangeJob
+ end
- HoverJob: untyped
+ class HoverJob
+ attr_reader id: String
- CompletionJob: untyped
+ attr_reader path: Pathname
- LSP: untyped
+ attr_reader line: Integer
- attr_reader service: untyped
+ attr_reader column: Integer
- def initialize: (project: untyped, reader: untyped, writer: untyped, ?queue: untyped) -> void
+ def initialize: (id: String, path: Pathname, line: Integer, column: Integer) -> void
+ end
- def handle_job: (untyped job) -> untyped
+ class CompletionJob
+ attr_reader id: String
- def handle_request: (untyped request) -> untyped
+ attr_reader path: Pathname
- def process_hover: (untyped job) -> untyped
+ attr_reader line: Integer
- def process_completion: (untyped job) -> untyped
+ attr_reader column: Integer
- def format_completion_item_for_rbs: (Services::SignatureService sig_service, untyped type_name, untyped context, untyped job, untyped prefix) -> (nil | untyped)
+ attr_reader trigger: String
- def format_comment: (untyped comment) -> (untyped | nil)
+ def initialize: (id: String, path: Pathname, line: Integer, column: Integer, trigger: String) -> void
+ end
- def format_comments: (Array[RBS::AST::Comment] comments) -> untyped?
+ type job = ApplyChangeJob | HoverJob | CompletionJob
- def format_completion_item: (untyped item) -> untyped
+ module LSP = LanguageServer::Protocol
- def method_type_to_snippet: (untyped method_type) -> ::String
+ attr_reader service: Services::TypeCheckService
- def params_to_snippet: (untyped fun) -> untyped
+ def initialize: (project: Project, reader: Reader, writer: Writer, ?queue: Queue) -> void
- def relative_name_in_context: (untyped type_name, untyped context) -> untyped
+ def handle_job: (job) -> void
+
+ type lsp_request = { id: String, method: String, params: untyped }
+
+ def handle_request: (lsp_request) -> void
+
+ def process_hover: (HoverJob job) -> untyped
+
+ def process_completion: (CompletionJob job) -> untyped
+
+ def format_completion_item_for_rbs: (Services::SignatureService, RBS::TypeName, CompletionJob job, String complete_text, Integer prefix_size) -> untyped
+
+ def format_comment: (Comment? comment) -> untyped?
+
+ def format_comments: (Array[RBS::AST::Comment] comments) -> untyped?
+
+ def format_completion_item: (CompletionProvider::item item) -> untyped
+
+ def method_type_to_snippet: (RBS::MethodType method_type) -> ::String
+
+ def params_to_snippet: (RBS::Types::Function fun) -> String
end
end
end