lspeasy / core/src / buildMethodSets
Function: buildMethodSets()
ts
function buildMethodSets(capabilityKey): {
all: Set<string>;
alwaysAllowed: Set<string>;
};Defined in: packages/core/src/utils/capability-guard.ts:25
Builds the full set of LSP methods and the subset that are always allowed (not gated by a capability) for a given capability key.
Parameters
| Parameter | Type | Description |
|---|---|---|
capabilityKey | CapabilityKey | Whether to index by 'ServerCapability' or 'ClientCapability'. |
Returns
ts
{
all: Set<string>;
alwaysAllowed: Set<string>;
}An object with all (every known method) and alwaysAllowed (methods that do not require a capability declaration).
| Name | Type | Defined in |
|---|---|---|
all | Set<string> | packages/core/src/utils/capability-guard.ts:26 |
alwaysAllowed | Set<string> | packages/core/src/utils/capability-guard.ts:27 |
Remarks
Iterates every entry in LSPRequest and LSPNotification to collect method strings, then marks those without a corresponding capability entry as always-allowed (e.g. initialize, shutdown, $/cancelRequest).