Skip to content

Intellicode doesnt work on python #135

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

Closed
captainfffsama opened this issue Oct 17, 2019 · 5 comments
Closed

Intellicode doesnt work on python #135

captainfffsama opened this issue Oct 17, 2019 · 5 comments

Comments

@captainfffsama
Copy link

Product and Version [VS/VSCode]:VSCode 1.39.2
OS Version [macOS/Windows]:Ubuntu 18.04
IntelliCode Extension Version: 1.1.9
Target Platform or Language [e.g. Node.js]: python

I have install Intellicode in VSCode and no error was report by vscode,it seems work.
but when I start coding,I found intellicode can no prompt right context!!!
for example:

import torch.optim as optim
#I want to use Adam which is an attr of optim
optimizer_ft=optim.

It just show lr_scheduler!!!and there is no other choice that I can choose...
the same thing also happen in other python 3rd module...
so I have to set "python.jediEnabled": true ,to ensure that the code can be automatically completed...
Here is My VSCode setting.json:

{
    "python.pythonPath": "D:\\IDE\\Anaconda3\\envs\\keras\\python.exe",
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
    "python.linting.enabled": false,
    // "terminal.integrated.shellArgs.windows": [
    //     "/K" ,
    //     "D:\\IDE\\Anaconda3\\Scripts\\activate.bat D:\\IDE\\Anaconda3"
    // ],
    "terminal.integrated.shellArgs.windows": [
        "/k","%CMDER_ROOT%\\anacondaCmder.bat" 
    ],
    "terminal.integrated.rendererType": "dom",
    "editor.suggestSelection": "first",
    "workbench.sideBar.location": "left",
    "sync.gist": "b90b964c90deece9474084a05dfe727f",

///注释设置
    "fileheader.configObj": {
        "createFileTime": true,
        "timeNoDetail": false,
        "language": {
        "languagetest": {
            "head": "/$$",
            "middle": " $ @",
            "end": " $/"
        },
        "py": {
            "head": "",
            "middle": "# @",
            "end": ""
        }
        },
        "autoAdd": false,
        "autoAlready": true,
        "annotationStr": {
        "head": "/*",
        "middle": " * @",
        "end": " */",
        "use": false
        },
        "headInsertLine": {
        "py": 0
        },
        "beforeAnnotation": {
        "py": "# -*- coding: utf-8 -*-"
        },
        "specialOptions": {}
    },

    "fileheader.cursorMode": {},

    "fileheader.customMade": {
        "Description": "",
        "Author": "HuQiong",
        "Date": "Do not edit",
        "LastEditTime": "Do not edit",
        "LastEditors": "HuQiong"
    },
    "editor.renderWhitespace": "all",
    "editor.largeFileOptimizations": false,
    "remote.SSH.showLoginTerminal": true,
    "remote.SSH.configFile": "/home/chiebotgpuhq/MyConfig/ssh/vscode/ssh_config",
    "workbench.iconTheme": "vscode-icons",
    "sync.forceUpload": true,
    "vsicons.dontShowNewVersionMessage": true,
    "update.mode": "manual",
    "editor.fontFamily": "Consolas, 'Courier New', monospace",
    "editor.fontLigatures": true,
    "terminal.integrated.shell.linux": "/bin/bash",
    "git.enableSmartCommit": true,
    "editor.detectIndentation": false,
    "window.zoomLevel": 2,
    "terminal.integrated.inheritEnv": true,
    "python.jediEnabled": false,
}

I have re install vscode twice,but this problem is still exist...

@DavidObando
Copy link
Collaborator

Hi hqabcxyxz,

In your description above you mentioned that you have set "python.jediEnabled": true but in the settings file you pasted it's set to false. Can you clarify if the issue you're experiencing is that you're not getting IntelliCode when you turn Jedi on?

Currently IntelliCode only works on the Microsoft Python Language Server, but not on Jedi.

David.

@DenisTis
Copy link

DenisTis commented Nov 7, 2019

I have exactly same error and also only setting "jedi enabled" and rejecting Language Server start makes it work.

@tiagofernandez
Copy link

tiagofernandez commented Feb 14, 2020

Having "python.jediEnabled": true is the only way to make features like "go to a function's definition" (F12) work for me – which brings up the dialog below every time I open a workspace.

image

@savannahostrowski
Copy link

Hi hqabcxyxz,

Thanks for your feedback. This is a problem with the Python Language Server. There is an open issue to fix this here.

In this open issue, there is also some information around how you might be able to work around the bug in the meantime by adding a couple lines to your settings.

Thanks!
Savannah

@markw-t
Copy link
Contributor

markw-t commented Feb 27, 2020

Hi @hqabcxyxz

Given @savannahostrowski 's comment above, this is already being tracked by a Python Language Server bug, so I'm closing this item.

Thanks for raising this issue and for trying IntelliCode - let us know if you see other issues or have suggestions for us to improve the product!

Mark

@markw-t markw-t closed this as completed Feb 27, 2020
gewarren pushed a commit that referenced this issue Mar 4, 2021
Updates from public repo
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

No branches or pull requests

6 participants