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

Allow usage of Language Service plugins via tsconfig.json compilerOptions.plugins? #160

Open
karlhorky opened this issue Jan 3, 2021 · 0 comments

Comments

@karlhorky
Copy link

I would like to use typescript-formatter on the command line to call the SQL formatting functionality in typescript-sql-tagged-template-plugin (when SQL is in inline tagged template literals).

The language service plugin implements getFormattingEditsForRange, but it is not being loaded if I specify it in tsconfig.json as follows:

{
  "compilerOptions": {
    "plugins": [
      { "name": "typescript-sql-tagged-template-plugin" }
    ]
  }
}

I'm guessing because TypeScript is being imported from 'typescript', instead of 'typescript/lib/tsserverlibrary', which seems to be required for enabling plugins.

I also found a gist from @weswigham, which seems to go in this direction.

Would this use case be something possible to support here?

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

No branches or pull requests

1 participant