Skip to content

Commit

Permalink
Fix for null resolveProvider in codeAction
Browse files Browse the repository at this point in the history
The resolveProvider field doesn't need to be present even if the codeAction param is.

From the specification:

```
export interface CodeActionOptions extends WorkDoneProgressOptions {
	/**
	 * CodeActionKinds that this server may return.
	 *
	 * The list of kinds may be generic, such as `CodeActionKind.Refactor`,
	 * or the server may list out every specific kind they provide.
	 */
	codeActionKinds?: CodeActionKind[];

	/**
	 * The server provides support to resolve additional
	 * information for a code action.
	 *
	 * @SInCE 3.16.0
	 */
	resolveProvider?: boolean;
}
```
  • Loading branch information
fsommar authored May 24, 2024
1 parent b3ce9e1 commit ee929db
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ private boolean checkCodeActionProvider(Either<Boolean, CodeActionOptions> provi

private boolean checkCodeActionResolveProvider(Either<Boolean, CodeActionOptions> provider) {
return provider != null && provider.isRight() && provider.getRight() != null
&& provider.getRight().getResolveProvider() != null
&& provider.getRight().getResolveProvider();
}
}

0 comments on commit ee929db

Please sign in to comment.