Open GustavoMelloGit opened 1 month ago
This might be related to
It should be fixed in the tomorrow preview release
This might be related to this It should be fixed in the tomorrow preview release
It might actually solve in the next release. I commented out the following lines and it solved the issue:
"code_actions": {
"source.organizeImports": true,
"source.removeUnusedImports": true
}
@GustavoMelloGit Can you confirm whether you still have this issue when using Zed Preview. You can safely install both Zed Stable and Zed Preview at the same time to test it out.
@notpeter Of course! Tested here and the issue seems to have changed. Now it does not add a ton of eslint-disable lines, but it also does not fix the issues (Same configs and project then before). If you want to, i can record it again.
Zed: v0.146.1 (Zed Preview)
OS: macOS 14.5.0
Memory: 24 GiB
Architecture: aarch64
So what exactly is the issue? That it adds the class again?
Also, is there a specific reason for why you have code_actions_on_format
and code_actions
as formatter? Why not merge them into one?
{
"formatter": {
"code_actions": {
"source.organizeImports": true,
"source.removeUnusedImports": true,
"source.fixAll.eslint": true
}
}
}
If you do this, do you get the same behavior? If so, which code action do you have to comment out to make it work?
https://github.com/user-attachments/assets/738799a8-c4bd-4bcf-95c6-e85c328c122d
@mrnugget Using the settings that you sent i get this.
It kinda works, but it is unstable. I was pressing cmd+s the entire time in the beginning and it was'nt fixing the issues. Also it does not fix some issues properly, as you can see on converting '
to "
.
Zed: v0.146.1 (Zed Preview)
OS: macOS 14.5.0
Memory: 24 GiB
Architecture: aarch64
I wrote above:
If so, which code action do you have to comment out to make it work?
Did you try that? Play with different configurations to filter out which one's causing the issue?
(Maybe it's the combination of all three causing the issue, but that would be good to know too)
You wrote:
It kinda works, but it is unstable. I was pressing cmd+s the entire time in the beginning and it was'nt fixing the issues.
It only runs code_actions_on_format
on cmd+s
if the file is dirty and there's something to be saved. Sounds like you didn't have a dirty file and thus nothing was saved on cmd+s
and thus no code actions ran.
Also it does not fix some issues properly, as you can see on converting
'
to"
.
I'm not sure I can spot exactly what the issue is. Can you show a clear case where that happens? You did change some "
to '
at ~30s, but then a stray '
shows up and I don't know where that comes from.
Sounds like you didn't have a dirty file
I did have some prettier issues going on, as you can see:
but then a stray ' shows up and I don't know where that comes from.
It added itself on cmd+s, it looks like this happens sometimes. Even if I comment out organizeImports and removeUnusedImports, it still occurs. I did some tests without these two settings, and it looks better but is not perfect. Do you want me to try a specific scenario?
Sounds like you didn't have a dirty file
I did have some prettier issues going on, as you can see:
That's not a dirty file though, no? A dirty file is one that has changes in it that haven't been saved yet. Like completion.rs
here:
Even if I comment out organizeImports and removeUnusedImports, it still occurs. I did some tests without these two settings, and it looks better but is not perfect. Do you want me to try a specific scenario?
So that means it's only the "source.fixAll.eslint": true
action that causes the problems then?
So that means it's only the "source.fixAll.eslint": true action that causes the problems then?
In the stable version, source.organizeImports
and source.removeUnusedImports
make things worse. However, in Zed Preview, it seems that only source.fixAll.eslint
causes issues on its own.
However, in Zed Preview, it seems that only
source.fixAll.eslint
causes issues on its own.
Can you provide a very small reproducible test case? i.e. a code file, an eslint config, a package json that shows the problem? Otherwise it's really hard to track this down.
@mrnugget at the beginning i have sent all my configs. Is there anything left? I guess providing a CodeSandBox link does not help much....
Yeah, you provided a 114-line ESLint configuration file 😄 That's not "small" to me, and I don't think it's a minimal reproducible example.
Check for existing issues
Describe the bug / provide steps to reproduce it
Current zed settings:
Project Eslintrc.json
Project .editorconfig
Project .prettierrc
Environment
Zed: v0.144.4 (Zed) OS: macOS 14.5.0 Memory: 24 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
https://github.com/user-attachments/assets/1b36567e-b2fa-4539-b221-3fc07ca1cc1e
If applicable, attach your Zed.log file to this issue.
Zed.log