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

Visual Studio Code F2 rename symbol key is adding newlines in Python #17123

Closed
HezzyBear opened this issue Jul 16, 2021 · 10 comments
Closed

Visual Studio Code F2 rename symbol key is adding newlines in Python #17123

HezzyBear opened this issue Jul 16, 2021 · 10 comments
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority

Comments

@HezzyBear
Copy link

Issue Type: Bug

Select a word. Hit F2 key. Change word. After I hit enter there are now spaces between the lines.

VS Code version: Code 1.58.2 (c3f126316369cd610563c75b1b1725e0679adfb3, 2021-07-14T22:10:15.214Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

@alexdima
Copy link
Member

@HezzyBear I cannot reproduce. Do you have additional details to help us reproduce?

Kapture.2021-08-17.at.15.43.25.mp4

@HezzyBear
Copy link
Author

HezzyBear commented Aug 17, 2021 via email

@alexdima
Copy link
Member

@HezzyBear Could you perhaps try to create a screen recording. Did you see the one I created, are you doing anything different? Does this reproduce when disabling all extensions?

@HezzyBear
Copy link
Author

connect4.py.-.Visual.Studio.Code.2021-08-23.13-35-34.mp4

@HezzyBear
Copy link
Author

@alexdima As you can see I've posted a video. The only extension I have running is the IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more. If you need anymore info don't hesitate to ask. Thanks Gary

@HezzyBear HezzyBear changed the title F2 key and line spaces F2 rename symbol key for Visual Studio Code adding line spaces Aug 23, 2021
@HezzyBear HezzyBear changed the title F2 rename symbol key for Visual Studio Code adding line spaces Visual Studio Code F2 rename symbol key is adding line spaces Aug 23, 2021
@alexdima alexdima assigned karthiknadig and brettcannon and unassigned alexdima Aug 25, 2021
@alexdima alexdima changed the title Visual Studio Code F2 rename symbol key is adding line spaces Visual Studio Code F2 rename symbol key is adding newlines in Python Aug 25, 2021
@alexdima
Copy link
Member

alexdima commented Aug 25, 2021

@HezzyBear Thank you for the extra information. This looks like a problem with the Python language server that computes the edits for renaming. It appears it is inserting \n after all lines.

We might want to move this to https://github.com/microsoft/vscode-python

@karthiknadig
Copy link
Member

This is pappasam/jedi-language-server#159

@brettcannon
Copy link
Member

This also means that you are not using Pylance, @HezzyBear . If you explicitly want Pylance then please check your "python.languageServer" setting.

@brettcannon brettcannon transferred this issue from microsoft/vscode Aug 25, 2021
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 25, 2021
@karthiknadig karthiknadig added area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug needs PR important Issue identified as high-priority and removed triage-needed Needs assignment to the proper sub-team labels Aug 26, 2021
@aravindmdev
Copy link

Installing Pylance will resolve this issue.

@luabud
Copy link
Member

luabud commented Oct 28, 2021

Closing in favour of upstream issue pappasam/jedi-language-server#159.

@luabud luabud closed this as completed Oct 28, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests

6 participants