// LSPCompletionItem.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT // LyrebirdLiveCompile // // One parsed code-completion candidate from `sourcekit-lsp`. macOS only. #if os(macOS) /// One code-completion candidate returned by sourcekit-lsp. public struct LSPCompletionItem: Sendable, Equatable { /// Display label (e.g. `Audio`). public let label: String /// Type / signature detail (e.g. `OscSin.Audio`), if provided. public let detail: String? /// Text to insert when chosen. Falls back to `label` when the server gives /// no explicit insert text. public let insertText: String /// LSP `CompletionItemKind` raw value, or `nil`. Lets the UI pick an icon. public let kind: Int? /// Server-provided sort key; the UI orders by this then by `label`. public let sortText: String? public init( label: String, detail: String?, insertText: String, kind: Int?, sortText: String? ) { self.label = label self.detail = detail self.insertText = insertText self.kind = kind self.sortText = sortText } } #endif