Skip to content

LanguageService Plugin cannot intercept 'getSupportedCodeFixes' #28966

Closed

Description

TypeScript Version: 3.3.0-dev.20181208

Search Terms:

getSupportedCodeFixes

Expected behavior:

GetSupportedCodeFixes calls LanguageService#getSupportedCodeFixes. LS plugins can intercept this call and add their own error codes for code fixes.

Actual behavior:

GetSupportedCodeFixes (indirectly) calls codefix.getSupportedErrorCodes() completely bypassing the LanguageService

Activity

  1. added
    Bug
    Domain: API
    Domain: LS: TSServer
    on Dec 11, 2018
  2. ajafff commented on Dec 12, 2018

    @ajafff
    ContributorAuthor

    I wanted to fix this, but it turns out getSupportedCodeFixes doesn't get a fileName and therefore doesn't know which LanguageService to use. I'll open an issue with VSCode for that.

  3. mjbvz commented on Dec 12, 2018

    @mjbvz
    Contributor
  4. ajafff commented on Dec 12, 2018

    @ajafff
    ContributorAuthor

    Matt Bierner (@mjbvz) I already saw that one and decided against monkey-patching. I'll just wait until this is fixed

  5. mjbvz commented on Dec 13, 2018

    @mjbvz
    Contributor

    You may want to consider using the workaround. This change will require both a tsserver api change and editor adoption, which could take a while

  6. DanielRosenwasser commented on Dec 13, 2018

    @DanielRosenwasser
    Member

    Sounds like there's two changes

    1. make this API take an optional fileName and projectName
    2. make this API proxy-able
  7. added
    Effort: Moderate
    on Dec 13, 2018
  8. added a commit that references this issue on Dec 13, 2018
    2d44b8a
  9. added a commit that references this issue on Dec 5, 2022
    1aab032
  10. added a commit that references this issue on Dec 8, 2022
    3716ffe
  11. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDomain: APIDomain: LS: TSServerEffort: Moderate

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions