jupyter-lsp / jupyterlab-lsp

Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol
https://jupyterlab-lsp.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.82k stars 148 forks source link

Continuous hinting doesn't work #1011

Closed d3mage closed 1 year ago

d3mage commented 1 year ago

Description

I am relatively new to Python and Jupyter so I desperately need autocomplete to help me. I have followed the guide in the README.md, and installed the server, but the hinting doesn't work. The python-lsp-server should work because now I can see the lint.

image

Reproduce

pip install 'jupyterlab>=4.0.0,<5.0.0a0' jupyterlab-lsp pip install 'python-lsp-server[all]'

Expected behavior

Expected the autocomplete to work.

Context

Required: installed server extensions
jupyter_lsp enabled
    - Validating jupyter_lsp...
Package jupyter_lsp took 0.0175s to import
A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.      jupyter_lsp 2.2.0 ok
    jupyter_server_fileid enabled
    - Validating jupyter_server_fileid...
Package jupyter_server_fileid took 0.0030s to import
      jupyter_server_fileid 0.9.0 ok
    jupyter_server_terminals enabled
    - Validating jupyter_server_terminals...
Package jupyter_server_terminals took 0.0093s to import
      jupyter_server_terminals 0.4.4 ok
    jupyter_server_ydoc enabled
    - Validating jupyter_server_ydoc...
Package jupyter_server_ydoc took 0.0356s to import
      jupyter_server_ydoc 0.8.0 ok
    jupyterlab enabled
    - Validating jupyterlab...
Package jupyterlab took 0.1591s to import
      jupyterlab 4.0.8 ok
    nbclassic enabled
    - Validating nbclassic...
Package nbclassic took 0.0015s to import
A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.  
      nbclassic 1.0.0 ok
    notebook_shim enabled
    - Validating notebook_shim...
Package notebook_shim took 0.0000s to import
A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      notebook_shim  ok
Required: installed lab extensions
jupyterlab_pygments v0.2.2 enabled  X (python, jupyterlab_pygments)
        @jupyter-lsp/jupyterlab-lsp v5.0.0 enabled ok (python, jupyterlab-lsp)

   The following extensions are outdated:
        jupyterlab_pygments

   Consider checking if an update is available for these packages.

Disabled extensions:
    @jupyterlab/completer-extension:base-service
    @jupyterlab/fileeditor-extension:language-server
    @jupyterlab/lsp-extension:settings
    @jupyterlab/notebook-extension:language-server
krassowski commented 1 year ago

Did you enable it in settings? Temporarily it needs to be enabled in two both JupyterLab completion settings and in LSP completion settings.

d3mage commented 1 year ago

@krassowski

{
    "continuousHinting": true,
    "suppressContinuousHintingIn": [
        "Comment",
        "BlockComment",
        "LineComment",
        "String"
    ],
    "suppressTriggerCharacterIn": [
        "Comment",
        "BlockComment",
        "LineComment",
        "String"
    ],
    "waitForBusyKernel": true,
    "theme": "vscode",
    "kernelCompletionsFirst": false,
    "caseSensitive": true,
    "includePerfectMatches": true,
    "preFilterMatches": true,
    "labelExtra": "auto",
    "layout": "side-by-side",
    "typesMap": {
        "<unknown>": "Kernel",
        "instance": "Value",
        "path": "File",
        "param": "Variable",
        "missing": "Constant",
        "nothing": "Constant",
        "undefinitializer": "Constant",
        "base.devnull": "Constant"
    },
    "disable": false
}
krassowski commented 1 year ago

That's only the LSP part.

d3mage commented 1 year ago

Could you aid me with enabling it in JupyterLab? Sorry, I have very limited knowledge regarding the domain.

krassowski commented 1 year ago

Part one:

image

Part two:

image

d3mage commented 1 year ago

@krassowski Thank you for your help! It works now

OsicKwon commented 9 months ago

Version 4.1.1 :: image image

krassowski commented 9 months ago

@OsicKwon you need to enable it in both "Code Completion" setting panels

OsicKwon commented 9 months ago

Hi @krassowski Thank you for your message. Yes, it worked perfect when I checked both of "Code Completion" in Version 4.1.1. In version of 4.1.1, there was many changes. One of the changes that I am looking for is using Ruff for Python, which doesn't work for me in Arch. Hopefully that will be solved on my end. Anyway, thanks as always.

LucioColonna commented 6 months ago

Hi guys,

I have the same exact problem, but I don't see the additional option "Enable autocompletion" in my settings. What can I do to solve it?