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 class ApplyChangeJob end class HoverJob attr_reader id: String attr_reader path: Pathname attr_reader line: Integer attr_reader column: Integer def initialize: (id: String, path: Pathname, line: Integer, column: Integer) -> void end class CompletionJob attr_reader id: String attr_reader path: Pathname attr_reader line: Integer attr_reader column: Integer attr_reader trigger: String def initialize: (id: String, path: Pathname, line: Integer, column: Integer, trigger: String) -> void end class SignatureHelpJob attr_reader id: String attr_reader path: Pathname attr_reader line: Integer attr_reader column: Integer def initialize: (id: String, path: Pathname, line: Integer, column: Integer) -> void end type job = ApplyChangeJob | HoverJob | CompletionJob | SignatureHelpJob module LSP = LanguageServer::Protocol attr_reader service: Services::TypeCheckService def initialize: (project: Project, reader: Reader, writer: Writer, ?queue: Queue) -> void 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) -> LanguageServer::Protocol::Interface::Hover? def process_completion: (CompletionJob job) -> LanguageServer::Protocol::Interface::CompletionList? def process_signature_help: (SignatureHelpJob) -> LanguageServer::Protocol::Interface::SignatureHelp? def format_completion_item_for_rbs: (Services::SignatureService, RBS::TypeName, CompletionJob job, String complete_text, Integer prefix_size) -> LanguageServer::Protocol::Interface::CompletionItem def format_completion_item: (CompletionProvider::item item) -> LanguageServer::Protocol::Interface::CompletionItem end end end