| Summary: | LSP extension does not format .tsx files correctly. | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Majid Madadi <madadi.majid> |
| Component: | application | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | minor | CC: | fanzhuyifan, waqar.17a |
| Priority: | NOR | ||
| Version First Reported In: | 24.05.2 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Majid Madadi
2024-08-15 22:10:46 UTC
The LSP server is responsible for formatting the file. So if the formatting is wrong, you need to report this to the author of the relevant LSP server, or check your configuration of LSP servers. You can also use the Formatting plugin instead. It will use prettier for tsx files and should be able to do a much better job. The formatter plugin also does not format correctly. Here is the error message:
[00:07:10  Format Error] SyntaxError: Unexpected non-whitespace character after JSON at position 919
at JSON.parse ()
at Socket. (/tmp/kate.ZgzKcb:22:68)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
|