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

User snippets in interactive window input #4200

Closed
janosh opened this issue Dec 10, 2020 · 8 comments
Closed

User snippets in interactive window input #4200

janosh opened this issue Dec 10, 2020 · 8 comments

Comments

@janosh
Copy link
Contributor

janosh commented Dec 10, 2020

Hope I didn't overlook any duplicates.

Would be cool if the interactive window input suggested user snippet completions.

{
  "import numpy": {
    "prefix": "inp",
    "body": [
      "import numpy as np"
    ],
    "description": "import numpy"
  }
}

Expected Behavior

Typing inp, I'd expect the first suggestion to be import numpy. In a Python file it is. In the IW input, I get other stuff.

no-completions

@DonJayamanne
Copy link
Contributor

Thanks for the suggestion we'll discuss this.

@maciejkos
Copy link

@DonJayamanne Could you please share what is the single source of truth as to what vscode-jupyter supports?

For example, I am trying to understand:

  • if there is no support for snippets at all or just for third-party snippets? There exists C:\Users\Christine\AppData\Roaming\Code\User\snippets\jupyter.json, but editing it doesn't seem to make any difference.
  • if any extensions are supported?
  • if highlighting of matching brackets is implemented? It was implemented in the past Highlighting of paired brackets does not work #2430, but I can't get it to work on my machine. I would be happy to file an issue if I knew whether the developers know about it or not.

@DonJayamanne
Copy link
Contributor

@maciejkos Currently snippets are not supported in the interactive window input.
This is because that input is not a real VS Code text editor, hence most of the VS Code functionality is not supported in that input box.

@maciejkos
Copy link

Thanks, @DonJayamanne. Are all of the supported features listed in the Working with Jupyter Notebooks in Visual Studio Code doc?

@DonJayamanne
Copy link
Contributor

Unfortunately, no

@janosh
Copy link
Contributor Author

janosh commented Mar 4, 2021

@DonJayamanne Is #1231 the issue that tracks refactoring the interactive window to use VS Code internals?

@DonJayamanne
Copy link
Contributor

at tracks refactoring the interactive window to use VS Code internals?

Its the issue that tracks using VS Code Internals for notebooks (i.e. use the new VS Code Notebook UI instead of our webview based UI).

@joyceerhl
Copy link
Contributor

This is resolved in the preview interactive window, which features improved VS Code workbench integration and is currently the default in VS Code Insiders. Please let us know if it works for you and give us any feedback you have about the new experience 😊 If you find any bugs or have concerns, please file a new issue at https://github.com/microsoft/vscode-jupyter/issues so we can fix it. Thank you!

recording (3)

@greazer greazer closed this as completed Aug 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants