-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from koliyo/feature/consistent-lsp-naming
Make LSP method names more consistent
- Loading branch information
Showing
6 changed files
with
113 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Sources/LanguageServerProtocol/LanguageFeatures/LinkedEditingRange.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
import Foundation | ||
|
||
public typealias LinkedEditingRangeClientCapabilities = DynamicRegistrationClientCapabilities | ||
|
||
public struct LinkedEditingRangeParams: Codable, Hashable, Sendable { | ||
public let workDoneToken: ProgressToken? | ||
public let partialResultToken: ProgressToken? | ||
|
||
public let textDocument: TextDocumentIdentifier | ||
public let position: Position | ||
|
||
public init(workDoneToken: ProgressToken? = nil, partialResultToken: ProgressToken? = nil, textDocument: TextDocumentIdentifier, position: Position) { | ||
self.workDoneToken = workDoneToken | ||
self.partialResultToken = partialResultToken | ||
self.textDocument = textDocument | ||
self.position = position | ||
} | ||
} | ||
|
||
public struct LinkedEditingRanges : Codable, Sendable { | ||
public let ranges: [LSPRange] | ||
public let wordPattern: String? | ||
|
||
public init(ranges: [LSPRange], wordPattern: String? = nil) { | ||
self.ranges = ranges | ||
self.wordPattern = wordPattern | ||
} | ||
} | ||
|
||
|
||
public typealias LinkedEditingRangeResponse = LinkedEditingRanges? |
39 changes: 39 additions & 0 deletions
39
Sources/LanguageServerProtocol/LanguageFeatures/Moniker.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,42 @@ | ||
import Foundation | ||
|
||
public typealias MonikerClientCapabilities = DynamicRegistrationClientCapabilities | ||
|
||
public struct MonikerParams: Codable, Hashable, Sendable { | ||
public let workDoneToken: ProgressToken? | ||
public let partialResultToken: ProgressToken? | ||
|
||
public let textDocument: TextDocumentIdentifier | ||
public let position: Position | ||
|
||
public init(workDoneToken: ProgressToken? = nil, partialResultToken: ProgressToken? = nil, textDocument: TextDocumentIdentifier, position: Position) { | ||
self.workDoneToken = workDoneToken | ||
self.partialResultToken = partialResultToken | ||
self.textDocument = textDocument | ||
self.position = position | ||
} | ||
} | ||
|
||
public enum UniquenessLevel: Codable, Sendable { | ||
case document | ||
case project | ||
case group | ||
case scheme | ||
case global | ||
} | ||
|
||
public enum MonikerKind : Codable, Sendable{ | ||
case _import | ||
case export | ||
case local | ||
} | ||
|
||
public struct Moniker : Codable, Sendable { | ||
public let scheme: String | ||
public let identifier: String | ||
public let unique: UniquenessLevel | ||
public let kind: MonikerKind? | ||
} | ||
|
||
|
||
public typealias MonikerResponse = [Moniker]? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters