typescript-prettier-language-service
Version:
TypeScript language service plugin for Prettier
27 lines (19 loc) • 1.09 kB
Markdown
# typescript-prettier-language-service
TypeScript language service plugin to format using prettier. Supports range formatting and document formatting.
## Issues
Leave a comment on our [cover page](https://replit.com/@util/typescript-prettier-language-service)
## Development
To develop on Replit
- fork this Repl
- hit the Run button to start compiling and watching changes
- make changes in `src/index.ts`
- when you want to test your changes:
- make an edit to the `languages.typescript` field (e.g. you can change `hostInfo`) to trigger the LSP server to restart and pick up the changes
- use the `logs` folder to read logs and debug
It is possible to hook-up a debugger to this using debug protocol, but it is not [configured](https://docs.replit.com/programming-ide/configuring-repl#debugger).
## TODOs:
- Only activate plugin when prettier is installed
- Allow configuring .editorConfig option
- Watch workspace to and clear prettier config cache when relevant
- Implement getFormattingEditsAfterKeystroke
- Combine spans that are both an addition and deletion in minimalEdits