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

fixall should consider range #71

Closed
Shane-XB-Qian opened this issue Dec 26, 2023 · 4 comments
Closed

fixall should consider range #71

Shane-XB-Qian opened this issue Dec 26, 2023 · 4 comments

Comments

@Shane-XB-Qian
Copy link
Contributor

'fix all' of code action should consider the range,
the statement in def pylsp_code_actions( :

    range : Dict
        Range argument given by pylsp. Not used here.

should be not true, this range i guess should be used later in checks_with_fixes to filter fixes only in this range.
otherwise 'fix all' probably in the action list all the time, but that actually maybe would get action nothing from it.

@jhossbach
Copy link
Member

I'm not sure what kind of range the 'Fix all' action should take, wouldn't you expect it to explicitly go through the whole document instead of only a range?

@Shane-XB-Qian
Copy link
Contributor Author

Shane-XB-Qian commented Dec 27, 2023 via email

@jhossbach
Copy link
Member

You mentioned that other language servers also include ranges in fix all actions, but I couldn't find any that check in the range only (i.e. ruff-lsp).
Otherwise I would be opposed to this, since the "Fix all" action is supposed to just go through the document and apply any easy applicable fixes without any user input required.

@Shane-XB-Qian
Copy link
Contributor Author

Shane-XB-Qian commented Dec 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants