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

Source actions not appearing in VS Code integration #416

Open
snowsignal opened this issue Mar 30, 2024 · 4 comments
Open

Source actions not appearing in VS Code integration #416

snowsignal opened this issue Mar 30, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@snowsignal
Copy link
Contributor

Overview

VS Code shows no source actions available when running Command Palette > Source Action... in a file with several auto-fixable problems and disorganized imports. Both of the supported source actions, source.fixAll and source.organizeImports, should show up.

I suspect an issue in our server implementation, hence why I'm filing this as a ruff-lsp issue.

Details

  • Ruff version: v0.3.3
  • ruff-lsp version: v0.0.53
  • ruff-vscode version: 2024.16.0
  • Tested on the scipy codebase, commit 488db3d39dae9f65d61d6dc1f4bccdcea92321cd, file scipy/special/tests/test_basic.py. A tool.ruff section was added to the pyproject.toml, with select = ["ALL"] as the only provided configuration.
@snowsignal snowsignal added the bug Something isn't working label Mar 30, 2024
@snowsignal snowsignal self-assigned this Mar 30, 2024
@charliermarsh
Copy link
Member

Interesting. Should those actions definitely be visible there? The official isort extension from Microsoft doesn't seem to show them either. In my experience users typically run these by name:

Screenshot 2024-03-29 at 9 19 55 PM

@snowsignal
Copy link
Contributor Author

@charliermarsh Those actions should definitely be visible. It's true that we also support command execution as a way to perform the same actions, which is probably what most users do, but I'm worried that this also affects editors that show source actions more visibly, like Neovim (though I still need to see if this can be reproduced there).

@smsossah
Copy link

smsossah commented Jun 2, 2024

I'm running into the same issue with neovim and it was working previously. I'm getting a "No code actions available" and I was able to narrow it down to ruff-lsp as well @snowsignal @charliermarsh. (Edited) Everything works as expected when I downgrade to 0.0.52. Seems to be a bug with 0.0.53

@dhruvmanila
Copy link
Member

@smsossah Can you open a new issue with all the relevant details? These could be your Neovim setup, Ruff version, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants