srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

auto completion works well on Linux but not on Windows #242

Open jdhao opened 6 years ago

jdhao commented 6 years ago

I have installed SublimeJEDI with Sublime Text 3 both on Windows and CentOS. On both platform, I use the python shipped with Anaconda. But I find that it does not work well on Windows. I have set it to complete on dot in my preference settings,

{
    // ...
    "auto_complete_triggers": [{"selector": "source.python", "characters": "."}],
}

In order to debug, I use the setting

{
     "logging_level": "info",
}

in the JEDI setting file. I have observed that JEDI immediately start completing after I type triggers such as ., i on CentOS but not on Windows.

How to deal with this issue?

srusskih commented 6 years ago

does it completion on TAB or CTRL+SPACE (or another hot keys that triggers completion) ?

jdhao commented 6 years ago

On windows, in order to auto-complete, for the import command, I have type import and then type at least the initial character of the package, then if I press TAB, completion will work. For the method completion to work, I have to type ., then at least type the first character of the method and press TAB to trigger completion.

This behavior is different from the Linux platform and is awkward.

srusskih commented 6 years ago

does sublime text user preferences same for both systems ?

jdhao commented 6 years ago

Yes, the settings are the same. In the sublime_jedi.sublime-settings file, I use the following options:

{
    "auto_complete_function_params": "",
    "logging_level": "info",
    "sublime_completions_visibility": "default"
}

In the sublime preference settings, I add the following auto-complete triggers,

"auto_complete_triggers":
[
    {
        "characters": ".",
        "selector": "source.python"
    }
],

Also, according to trouble shooting, I removed import from the file Completion Rules.tmPreferences.

srusskih commented 6 years ago

will try to find windows somewhere to check. currently have no clue what the reason.

jdhao commented 6 years ago

In order to better illustrate the idea. I have made two images

From the two image, we can see that on Windows, the auto-completion is kind of slow and "lazy", it will work only after I have type . and initial character of a method and press TAB.

But on Linux, the auto-completion starts to work once I begin to type. Also for methods completion, once I have type ., it will start to complete. No need to press TAB.

The behaviors on these two system are just way too different.