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

[Feature]: LSP #402

Open
abarbu opened this issue Jan 4, 2023 · 2 comments
Open

[Feature]: LSP #402

abarbu opened this issue Jan 4, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@abarbu
Copy link

abarbu commented Jan 4, 2023

What's missing?

Jupyter LSP support has two components. A frontend component and a server component, jupyter-lsp.

I have tried, but I cannot get jupyter-lsp to load up in a server created by jupyterWith; even if I do something hacky to get the frontend component loaded up.

What's the right way to get LSP working?

Possible solution

No response

Alternatives

No response

Additional context

No response

@abarbu abarbu added the enhancement New feature or request label Jan 4, 2023
@djacu
Copy link
Contributor

djacu commented Jan 12, 2023

Hey @abarbu

What have you tried so far.

I tried to setup a kernel real quick and ran into some issues. Here is what I did.

  1. Followed the Quick Start on the docs site to pull down the template. https://jupyterwith.tweag.io/getting-started/
  2. Created a new folder my-project/kernels/custom-python for the new kernel.
  3. Created a default.nix file in there with the following.
{
  name,
  availableKernels,
  extraArgs,
}:
availableKernels.python {
  projectDir = ./.;
  displayName = "Python with jupyterlab-lsp";
  name = "python-with-jupyterlab-lsp";
}
  1. Created a pyproject.toml file with the following.
[tool.poetry]
name = "jupyter-nix-kernel-ipython"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.9"
ipykernel = "^6.15.0"
jupyterlab-lsp = "^3.10.2"
python-lsp-server = {extras = ["all"], version = "^1.7.0"}

[tool.poetry.dev-dependencies]
# build systems for dependencies
hatchling = "^1.3.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
  1. lock the dependencies with poetry lock
  2. Run nix run at the top level.

However, after I tried that I ran into an infinite recursion error similar to nix-community/poetry2nix#750.
I tried adding some overrides but that created new problems.

@GTrunSec
Copy link
Collaborator

GTrunSec commented Feb 3, 2023

I wish I have solved your LSP request. please look at #419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants