Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes sorbet-lsp supports
Empty
CodeActionKind.spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionKind
For example, vim-lsp sends
Empty
CodeActionKind inonly
property of CodeActionContext.code: https://github.com/prabirshrestha/vim-lsp/blob/3af8f3b38effc4a631a15bb283a4b701c251275d/autoload/lsp/ui/vim/code_action.vim#L55
Related slack thread: https://sorbet-ruby.slack.com/archives/CFT8Y4909/p1701997597443059
Motivation
Vim with vim-lsp users cannot use Sorbet's CodeAction because sorbet-lsp returns the following error message when vim-lsp requests CodeAction.
This error message looks like truncated because the error is caused by an empty string (
""
), which representsEmpty
CodeActionKind.Test plan
I am sorry but I don't have good idea to write code to check make_lsp_types.cc follows the spec.
I would like to have some advice to do that if I need to write test in this case.