Skip to content

Commit f66956f

Browse files
committed
feat: add support for CodeAction
1 parent 3660267 commit f66956f

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

runtimes/runtimes/base-runtime.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag
269269
},
270270
onHover: handler => lspConnection.onHover(handler),
271271
onSignatureHelp: handler => lspConnection.onSignatureHelp(handler),
272+
onCodeAction: handler => lspConnection.onCodeAction(handler),
273+
onCodeActionResolve: handler => lspConnection.onCodeActionResolve(handler),
272274
extensions: {
273275
onGetConfigurationFromServer: lspServer.setServerConfigurationHandler,
274276
onInlineCompletionWithReferences: handler =>

runtimes/runtimes/standalone.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ export const standalone = (props: RuntimeProps) => {
410410
},
411411
onHover: handler => lspConnection.onHover(handler),
412412
onSignatureHelp: handler => lspConnection.onSignatureHelp(handler),
413+
onCodeAction: handler => lspConnection.onCodeAction(handler),
414+
onCodeActionResolve: handler => lspConnection.onCodeActionResolve(handler),
413415
extensions: {
414416
onGetConfigurationFromServer: lspServer.setServerConfigurationHandler,
415417
onInlineCompletionWithReferences: handler =>

runtimes/server-interface/lsp.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ import {
4848
ApplyWorkspaceEditParams,
4949
ApplyWorkspaceEditResult,
5050
DidSaveTextDocumentParams,
51+
CodeAction,
52+
CodeActionParams,
5153
DeleteFilesParams,
5254
CreateFilesParams,
5355
RenameFilesParams,
@@ -135,6 +137,8 @@ export type Lsp = {
135137
onExecuteCommand: (handler: RequestHandler<ExecuteCommandParams, any | undefined | null, void>) => void
136138
onSemanticTokens: (handler: RequestHandler<SemanticTokensParams, SemanticTokens | null, void>) => void
137139
onSignatureHelp: (handler: RequestHandler<SignatureHelpParams, SignatureHelp | null | undefined, void>) => void
140+
onCodeAction: (handler: RequestHandler<CodeActionParams, CodeAction[] | null | undefined, void>) => void
141+
onCodeActionResolve: (handler: RequestHandler<CodeAction, CodeAction, void>) => void
138142
workspace: {
139143
getConfiguration: (section: string) => Promise<any>
140144
onDidChangeWorkspaceFolders: (handler: NotificationHandler<DidChangeWorkspaceFoldersParams>) => void

0 commit comments

Comments
 (0)