sig/shims/language-server_protocol.rbs in steep-1.4.0.dev.3 vs sig/shims/language-server_protocol.rbs in steep-1.4.0.dev.4
- old
+ new
@@ -25,8 +25,273 @@
INFORMATION: String
HINT: String
end
+
+ module CompletionItemKind
+ type t = Integer
+
+ TEXT: Integer
+ METHOD: Integer
+ FUNCTION: Integer
+ CONSTRUCTOR: Integer
+ FIELD: Integer
+ VARIABLE: Integer
+ CLASS: Integer
+ INTERFACE: Integer
+ MODULE: Integer
+ PROPERTY: Integer
+ UNIT: Integer
+ VALUE: Integer
+ ENUM: Integer
+ KEYWORD: Integer
+ SNIPPET: Integer
+ COLOR: Integer
+ FILE: Integer
+ REFERENCE: Integer
+ FOLDER: Integer
+ ENUMMEMBER: Integer
+ CONSTANT: Integer
+ STRUCT: Integer
+ EVENT: Integer
+ OPERATOR: Integer
+ TYPEPARAMETER: Integer
+ end
+
+ module CompletionItemTag
+ type t = Integer
+
+ Deprecated: Integer
+ end
+
+ module InsertTextFormat
+ type t = Integer
+
+ PLAIN_TEXT: Integer
+
+ SNIPPET: Integer
+ end
+
+ module InsertTextMode
+ type t = Integer
+
+ AS_IS: Integer
+
+ ADJUST_INDENTATION: Integer
+ end
+
+ module MarkupKind
+ type t = "plaintext" | "markdown"
+
+ PLAINTEXT: "plaintext"
+
+ MARKDOWN: "markdown"
+ end
+ end
+
+ module Interface
+ interface _Base
+ def attributes: () -> Hash[Symbol, untyped]
+
+ alias to_hash attributes
+
+ def to_json: () -> String
+ end
+
+ class Position
+ include _Base
+
+ # 0-origin line number
+ attr_reader line: Integer
+
+ # 0-origin character position (== cursor position)
+ attr_reader character: Integer
+
+ def initialize: (line: Integer, character: Integer) -> void
+ | (Hash[Symbol, untyped]) -> void
+ end
+
+ class Range
+ include _Base
+
+ attr_reader start: Position
+
+ attr_reader end: Position
+
+ def initialize: (start: Position, end: Position) -> void
+ | (Hash[Symbol, untyped]) -> void
+ end
+
+ class MarkupContent
+ include _Base
+
+ attr_reader kind: Constant::MarkupKind::t
+
+ attr_reader value: String
+
+ def initialize: (kind: Constant::MarkupKind::t, value: String) -> void
+ end
+
+ class TextEdit
+ include _Base
+
+ attr_reader range: Range
+
+ attr_reader new_text: String
+
+ def initialize: (range: Range, new_text: String) -> void
+ end
+
+ class InsertReplaceEdit
+ include _Base
+
+ attr_reader new_text: String
+
+ attr_reader insert: Range
+
+ attr_reader replace: Range
+
+ def initialize: (new_text: String, insert: Range, replace: Range) -> void
+ end
+
+ class Command
+ include _Base
+
+ attr_reader title: String
+
+ attr_reader command: String
+
+ attr_reader arguments: Array[untyped]?
+
+ def initialize: (title: String, command: String, ?arguments: Array[untyped]?) -> void
+ end
+
+ class Hover
+ include _Base
+
+ attr_reader contents: MarkupContent
+
+ attr_reader range: Range
+
+ def initialize: (contents: MarkupContent, range: Range) -> void
+ end
+
+ class CompletionList
+ include _Base
+
+ attr_reader is_incomplete: bool
+
+ attr_reader items: Array[CompletionItem]
+
+ def initialize: (items: Array[CompletionItem], is_incomplete: bool) -> void
+ end
+
+ class CompletionItem
+ include _Base
+
+ attr_reader label: String
+
+ attr_reader label_details: CompletionItemLabelDetails?
+
+ attr_reader kind: Constant::CompletionItemKind::t?
+
+ attr_reader tags: Array[Constant::CompletionItemTag::t]?
+
+ attr_reader detail: String?
+
+ attr_reader documentation: MarkupContent?
+
+ attr_reader preselect: bool?
+
+ attr_reader sort_text: String?
+
+ attr_reader filter_text: String?
+
+ attr_reader insert_text: String?
+
+ attr_reader insert_text_format: Constant::InsertTextFormat::t?
+
+ attr_reader insert_text_mode: Constant::InsertTextMode::t?
+
+ attr_reader text_edit: TextEdit | InsertReplaceEdit | nil
+
+ attr_reader text_edit_text: String?
+
+ attr_reader additional_text_edits: Array[TextEdit]?
+
+ attr_reader commit_characters: Array[String]?
+
+ attr_reader command: Command?
+
+ attr_reader data: untyped?
+
+ def initialize:(
+ label: String,
+ ?label_details: CompletionItemLabelDetails?,
+ ?kind: Constant::CompletionItemKind::t?,
+ ?tags: Array[Constant::CompletionItemTag::t]?,
+ ?detail: String?,
+ ?documentation: MarkupContent?,
+ ?preselect: bool?,
+ ?sort_text: String?,
+ ?filter_text: String?,
+ ?insert_text: String?,
+ ?insert_text_format: Constant::InsertTextFormat::t?,
+ ?insert_text_mode: Constant::InsertTextMode::t?,
+ ?text_edit: TextEdit | InsertReplaceEdit | nil,
+ ?text_edit_text: String?,
+ ?additional_text_edits: Array[TextEdit]?,
+ ?commit_characters: Array[String]?,
+ ?command: Command?,
+ ?data: untyped?
+ ) -> void
+ end
+
+ class CompletionItemLabelDetails
+ include _Base
+
+ attr_reader detail: String?
+
+ attr_reader description: String?
+
+ def initialize: (?detail: String?, ?description: String?) -> void
+ end
+
+ class SignatureInformation
+ include _Base
+
+ attr_reader label: String
+
+ attr_reader documentation: MarkupContent?
+
+ attr_reader parameters: Array[ParameterInformation]?
+
+ attr_reader active_parameter: Integer?
+
+ def initialize: (label: String, ?documentation: MarkupContent?, ?parameters: Array[ParameterInformation]?, ?active_parameter: Integer?) -> void
+ end
+
+ class ParameterInformation
+ include _Base
+
+ attr_reader label: String | [Integer, Integer]
+
+ attr_reader documentation: MarkupContent?
+
+ def initialize: (label: String | [Integer, Integer], ?documentation: MarkupContent) -> void
+ end
+
+ class SignatureHelp
+ include _Base
+
+ attr_reader signatures: Array[SignatureInformation]
+
+ attr_reader active_signature: Integer?
+
+ attr_reader active_parameter: Integer?
+
+ def initialize: (signatures: Array[SignatureInformation], ?active_signature: Integer?, ?active_parameter: Integer?) -> void
+ end
end
end
end