Skip to content
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

Add support for triggerKind in code action requests #2042

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

rchl
Copy link
Member

@rchl rchl commented Sep 4, 2022

Set triggerKind for code action requests to indicate whether action was automatic or manual. Typescript server returns different refactorings depending on how the request is made.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionContext
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionTriggerKind

Adding support for triggerKind in typescript in typescript-language-server/typescript-language-server#579 in case someone wants to test.

Resolves #2041
Resolves #1890

@rchl rchl force-pushed the feat/trigger_kind_code_action branch from 27ab6fb to 8a2fc4d Compare September 4, 2022 21:48
@predragnikolic
Copy link
Member

This PR closes #1890

plugin/code_actions.py Outdated Show resolved Hide resolved
@rchl rchl merged commit d8bfe62 into main Sep 7, 2022
@rchl rchl deleted the feat/trigger_kind_code_action branch September 7, 2022 18:41
rchl added a commit to tdaniel22/LSP that referenced this pull request Sep 7, 2022
* main:
  Add support for triggerKind in code action requests (sublimelsp#2042)
  Custom context menu in log panel and "Clear log panel" item (sublimelsp#2045)
  Add icons and isPreferred support for code actions (sublimelsp#2040)
  Cut 1.18.0
rchl added a commit that referenced this pull request Sep 11, 2022
* main:
  Add group argument for LspGotoCommand (#2031)
  Add context menu entry in log panel for toggling lines limit (#2047)
  Automatically hide the diagnostics panel on save (#2037)
  Add support for triggerKind in code action requests (#2042)
  Custom context menu in log panel and "Clear log panel" item (#2045)
  Add icons and isPreferred support for code actions (#2040)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support code action context triggerKind CodeActionContext.triggerKind
3 participants