Skip to content

Commit 1908502

Browse files
Add parameterLabel modifier for argument labels
1 parent a3357c8 commit 1908502

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/LanguageServerProtocol/SupportTypes/SemanticTokenModifiers.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public struct SemanticTokenModifiers: OptionSet, Hashable, Sendable {
4646
public static let classScope = Self(rawValue: 1 << 18)
4747
public static let fileScope = Self(rawValue: 1 << 19)
4848
public static let globalScope = Self(rawValue: 1 << 20)
49+
50+
// The following is an LSP extension from SourceKit-LSP
51+
/// Marks a token as a parameter label in a function signature or call.
52+
public static let parameterLabel = Self(rawValue: 1 << 21)
4953

5054
public var name: String? {
5155
switch self {
@@ -70,6 +74,7 @@ public struct SemanticTokenModifiers: OptionSet, Hashable, Sendable {
7074
case .classScope: return "classScope"
7175
case .fileScope: return "fileScope"
7276
case .globalScope: return "globalScope"
77+
case .parameterLabel: return "parameterLabel"
7378
default: return nil
7479
}
7580
}
@@ -98,5 +103,6 @@ public struct SemanticTokenModifiers: OptionSet, Hashable, Sendable {
98103
.classScope,
99104
.fileScope,
100105
.globalScope,
106+
.parameterLabel,
101107
]
102108
}

0 commit comments

Comments
 (0)