New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CodeAction return value in lsp-execute-code-action #432

Merged
merged 1 commit into from Oct 10, 2018

Conversation

Projects
None yet
2 participants
@MaskRay
Member

MaskRay commented Sep 29, 2018

textDocument/codeAction returns (Command | CodeAction)[] | null

This patch applies edit?: WorkspaceEdit; if exists (which is an extra field CodeAction has, comparing with Command)

ccls now returns CodeAction[] for clang FixIts. Example:

  • void main() {}
  • M-x lsp-execute-code-action and select the action
  • int main() {}
Support CodeAction return value in lsp-execute-code-action
textDocument/codeAction returns (Command | CodeAction)[] | null

This patch applies `edit?: WorkspaceEdit;` if exists (which is an extra field CodeAction has, comparing with Command)
Show resolved Hide resolved lsp-methods.el
@MaskRay

This comment has been minimized.

Show comment
Hide comment
@MaskRay

MaskRay Oct 3, 2018

Member

Ping

Member

MaskRay commented Oct 3, 2018

Ping

@yyoncho yyoncho merged commit eaeea71 into emacs-lsp:master Oct 10, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MaskRay MaskRay deleted the MaskRay:code-action branch Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment