Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

autocomplete doesn't work for non-ASC identifiers on Win7, and some cases on Mac #1751

Closed
nobodxbodon opened this issue Oct 30, 2019 · 17 comments
Assignees

Comments

@nobodxbodon
Copy link

Steps to cause the bug to occur

  1. Below are the sample codes I used to reproduce the issue:
for 名字 in range(1, 10):
    # 有补全(Mac下),输入”名“
    print(名字)

When keying in the parameter of print, typing in the first character should trigger auto-complete, as the ASC identifier works.

Actual & Expected behavior

This 名字 variable triggers auto-complete under Mac:
中文补全Python_Mac成功
However a a different name 序号 doesn't work under Mac:
中文补全Python_Mac失败

Additionally, neither case works under Windows 7.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local | Remote | N/A
  • Extension version: 2019.10.44104-xxx
  • VS Code version: 1.39.2
  • Setting python.jediEnabled: true | false
  • Python and/or Anaconda version: 3.7.3 under Mac, 3.6.5 under Win7
  • OS: Windows | Mac
  • Virtual environment: N/A

Developer Tools Console Output

None.

@rchiodo
Copy link
Contributor

rchiodo commented Oct 30, 2019

Thanks for the issue.

Does this work inside of the python editor? Or are you only seeing this in notebook cells?

@nobodxbodon
Copy link
Author

@rchiodo in the python editor I suppose:
Screen Shot 2019-10-30 at 7 55 54 PM
Frankly I've not known of Jupyter Notebooks before, so please excuse me if I opened the issue in the wrong category.

@rchiodo
Copy link
Contributor

rchiodo commented Oct 31, 2019

Sorry not sure what your answer was. Does the problem also occur in the python editor or does it behave as expected there?

@nobodxbodon
Copy link
Author

@rchiodo the problem occurred in python editor, as I only tested there.

@xgdgsc
Copy link

xgdgsc commented Nov 2, 2019

Doesn't work for me in linux in neither python editor nor notebook.

@karthiknadig
Copy link
Member

@nobodxbodon @xgdgsc Are you using Jedi or Language Server? Please check the settings and let us know if JediEnabled is set.
image

@karthiknadig karthiknadig self-assigned this Nov 4, 2019
@nobodxbodon
Copy link
Author

@karthiknadig seems not for me:
Screen Shot 2019-11-04 at 3 39 13 PM

@xgdgsc
Copy link

xgdgsc commented Nov 5, 2019

Works for me on another machine using language server. I think it maybe the other machine using jedi. Thanks.

@karthiknadig
Copy link
Member

@nobodxbodon moving this to LS repo. Since it looks like you are using LS and running into this issue.

@xgdgsc If the issue you see is with jedi then please file it on the jedi repo: https://github.com/davidhalter/jedi

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Nov 5, 2019
@jakebailey
Copy link
Member

I'm not sure that this is an LS issue as much as it would be a VS Code issue to do with when they choose to send the completion request in this scenario. For example, I can hit Ctrl-Space to manually trigger a completion request, and we behave as expected.

@xgdgsc If you hit Ctrl+Space after typing the first character, does the expected thing happen?

image

@MikhailArkhipov
Copy link

I wonder what happens with the same character in, say, C# or C++.

@jakebailey
Copy link
Member

I know that the input method in the issue isn't the Wubi method (I think this is macOS's pinyin mode), but it may be similar to microsoft/vscode#83428 as the input method replaces written text with another string.

@nobodxbodon
Copy link
Author

@MikhailArkhipov TypeScript works under Mac for both cases as below, IIH.
名字:
TS_名
序号:
TS_序

@jakebailey I'm using a third-party pinyin input method (Sogou), but I can test with other input method.

@jakebailey
Copy link
Member

TS is somewhat special as it ships with VS Code (I think they're able to do things outside the LSP), so there might be a difference there.

@nobodxbodon
Copy link
Author

@jakebailey thanks for informing. C++ seems to have the same issue under Mac ( doesn't get auto-completion):
Cpp_名_序

Extension: ms-vscode.cpptools 0.25.1

@jakebailey
Copy link
Member

Thanks for checking.

You may want to respond on microsoft/vscode#83428 or create a new issue on the VS Code repo with your info (and potentially a link here), as this seems to be a VS Code bug involving input methods that do text replacement, rather than something language specific that we can handle on our end.

@jakebailey
Copy link
Member

I've linked this thread on their issue for more datapoints, but it's going to have to be a VS Code fix.

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

No branches or pull requests

6 participants