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

Auto indent for completion of a method is incorrect #7859

Open
rchiodo opened this issue Mar 25, 2024 · 1 comment
Open

Auto indent for completion of a method is incorrect #7859

rchiodo opened this issue Mar 25, 2024 · 1 comment
Assignees
Labels

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Mar 25, 2024

Using the test folder here:
https://github.com/microsoft/pylance-release/tree/main/testing/single

Open the completions.py.
Complete the method as shown below:

indentation

Expected behavior:
It works like VS code does and indents correctly.

Actual behavior:
The indentation is incorrect.

@StellaHuang95
Copy link
Contributor

Comparing between PTVS and VSCode, both are sending same "newText": "method(self, a) -> int:\n return super().method(a)" in completionItem/resolve request, but textDocument/didChange is sending different text (with vs without indentation), so looks like VS client should be handling the indentation here.

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

No branches or pull requests

3 participants