Giter VIP home page Giter VIP logo

vscode-jupyter-lsp-middleware's Introduction

VS Code Jupyter LSP Middle for Notebook and Interactive Window

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Directions for building

You might want to setup an npm link for the python repository

Then to build vscode-jupyter-lsp-middleware

  • npm run download-api (updates vscode.d.ts)
  • npm run webpack (which will setup stuff for using with vscode-python)

Directions for debugging with jupyter extension

  • Run the steps above for getting the npm link setup
  • From with VS code, open both jupyter and lsp-middleware as two folders
  • Build the 'webpack link' task for lsp-middleware
  • Build the compile task for jupyter
  • Set breakpoints in the dist/node/index.js file while debugging (it's a development webpack)
  • Edit lsp code
  • Rerun the 'webpack link' build every time (it doesn't watch as it runs a post build step)

Directions for running tests

  • npm run tests (builds and runs tests)

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

vscode-jupyter-lsp-middleware's People

Contributors

debonte avatar dependabot[bot] avatar donjayamanne avatar heejaechang avatar jrieken avatar microsoft-github-operations[bot] avatar microsoftopensource avatar rchiodo avatar rebornix avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-jupyter-lsp-middleware's Issues

Upgrade to new LSP modules for LSP notebooks support

The Pylance team would like to enable notebook support using the new LSP notebooks messages found in LSP 3.17. Our client, vscode-python, will also need to upgrade to enable this feature. And since vscode-python gets Middleware objects from vscode-jupyter-lsp-middleware, this middleware project needs to be upgraded also.

vscode-languageclient should be upgraded to the latest 8.0.0-next package
vscode-languageserver-types should be upgraded to the latest 3.17.0-next package

The latest versions of these packages can be found at https://github.com/microsoft/vscode-languageserver-node/tags

It's possible that lsp-notebook-concat needs to be modified as part of this work. The only LSP package it references is vscode-languageserver-protocol, and I thought that the 3.16 and 3.17 protocols were compatible, but when I was trying to upgrade vscode-jupyter-lsp-middleware myself I ran into some build errors that seemed to indicate that stuff was out of sync between the two projects. I may be mistaken.

Documentation for adding support for other languages

I tried listening for experimental notebookDocument/didOpen but it seems vscode doesn't send these events and still uses normal textDocument/didOpen events. So my question is, how this interacts with a language server exactly and how a language server can detect if it is in a jupyter notebook and detect special commands (like :deps in the Rust language which I'm interested in).

Complete transition to separate NPM module

  • import 'os' for path comparison needs to be changed to passing in a function
  • import utils needs to be removed
  • isNotebookCell needs to be abstracted or vscode parts removed

Don't relay raw notebook request to Pylance

Currently, notebook middleware sends not only LSP request for concat doc, but also relay all raw messages from notebook to us (Pylance).

currently, it works fine since we don't know how to handle notebook requests ourselves, so we drop them and only handle requests over concat docs, but soon Pylance will have ability to handle notebook request ourselves. and won't be able to know that 2 requests (notebook and concat) are actually for the same thing and process them conceptually twice.

middleware should only send concat message if jupyter.pylanceHandlesNotebooks is not set, and send only raw notebook message if it is set. but not both.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.