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

Continuous hinting doesn't work #1011

Closed
d3mage opened this issue Nov 10, 2023 · 10 comments
Closed

Continuous hinting doesn't work #1011

d3mage opened this issue Nov 10, 2023 · 10 comments

Comments

@d3mage
Copy link

d3mage commented Nov 10, 2023

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

  • Operating System and version: Windows 10 22H2
  • Browser and version: Firefox 118.0.2 (64-bit)
  • JupyterLab version: 4.0.8
  • Language server and version: python-lsp-server 1.9.0
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
Copy link
Member

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

@d3mage
Copy link
Author

d3mage commented Nov 10, 2023

@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
Copy link
Member

That's only the LSP part.

@d3mage
Copy link
Author

d3mage commented Nov 10, 2023

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

@krassowski
Copy link
Member

Part one:

image

Part two:

image

@d3mage
Copy link
Author

d3mage commented Nov 10, 2023

@krassowski Thank you for your help! It works now

@d3mage d3mage closed this as completed Nov 10, 2023
@OsicKwon
Copy link

Version 4.1.1 ::
image
image

@krassowski
Copy link
Member

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

@OsicKwon
Copy link

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.

@mastrodonte113
Copy link

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?

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

4 participants