Some TypeScript code actions are not applied #20384
Labels
bug
[core label]
language server
An umbrella label for all language servers
language
An umbrella label for all programming languages syntax behaviors
setting
Feedback for preferences, configuration, etc
typescript
TypeScript programming language support
Check for existing issues
Describe the bug / provide steps to reproduce it
When using
"code_actions_on_format"
in.ts
, or.tsx
files only"source.organizeImports"
actually modifies the code.Zed settings:
Repository I used for reproducing - https://github.com/mykytabatrak/zed-ts-code-actions.
I set up two files with a bunch of imports that need formatting:
src/main.tsx
andsrc/test.ts
. With"source.organizeImports"
imports get sorted and unused one are removed, while"source.addMissingImports"
,"source.removeUnusedImports"
, and"source.sortImports"
do not affect the code in any way.Also, I took a look at the vtsls code and I am not sure that it supports three actions I outlined above, so as per documentation I configured Zed to use typescript-language-server, and tried formatting code with the following configuration:
Unfortunately results were the same.
Environment
Zed: v0.160.7 (Zed)
OS: macOS 15.1.0
Memory: 36 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
First video is using Zed config with only code actions specified:
output.mov
Second video is with typescript-language-server configured in Zed:
output-2.mov
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: