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

[WIP] Implement code snippet completer #604

Closed

Conversation

jahn96
Copy link

@jahn96 jahn96 commented May 20, 2021

References

Starts working on implementing code snippet completion.
This pull request is related to the issue #208

Code changes

  • Create a package called code-snippet-completion
  • Add @krassowski/completion-manager to dev-dependencies in package.json
  • Add ICompletionProviderManager as optional token in activate function of your extension
  • Need to fix the error on Plugin '@krassowski/jupyterlab-lsp:completion' failed to activate and No provider for: @krassowski/completion-manager:ICompletionProviderManager. - could be related to the issue of setting up the environment.
  • Need to create a codeSnippetCompletionProvider class that implements ICompletionProviderManager
  • Need to register the class

User-facing changes

User will be able to see the autocomplete options for code snippets they have saved.

Backwards-incompatible changes

Chores

  • linted
  • tested
  • documented
  • changelog entry

@krassowski
Copy link
Member

Oh, so you thought about including it in the distribution of jupyterlab-lsp? I thought that you were going to include it in the snippets extension directly instead.

@kpinnipa
Copy link

We were thinking it might be better to include it in the distribution of jupyterlab-lsp, do you think it would be better to include it in the snippets extension directly?

@jahn96
Copy link
Author

jahn96 commented May 20, 2021

We were thinking that it would rather make sense to have code snippet autocomplete here as vscode-lsp provides code snippet autocomplete. But, now I think that it would be actually better to work in the snippets extension directly because it would be easier to fetch the saved snippets and so on. Sorry for the confusion and thank you for your feedback.

@krassowski
Copy link
Member

krassowski commented May 20, 2021

But, now I think that it would be actually better to work in the snippets extension directly because it would be easier to fetch the saved snippets and so on.

Exactly, it will be just easier for you. Plus, once the ICompletionProviderManager lands in JupyterLab core (again, probably for 4.0) your users will be able to have completion with snippets without having to have this LSP extension :)

@krassowski
Copy link
Member

But of course, if it is convenient for you to start working/experimenting here on this PR - absolutely feel free to do so :)

@krassowski krassowski changed the base branch from master to refactor-completer May 26, 2021 17:30
@krassowski krassowski force-pushed the refactor-completer branch from 4a745d6 to 321a341 Compare July 10, 2021 18:13
@krassowski
Copy link
Member

Hi, I am going to close this one as #600 on which one it is based was superseded by the work upstream. Please see #600 (comment) for references. Hopefully we can revisit it after JupyterLab 4.0 release :)

@krassowski krassowski closed this Mar 6, 2022
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

Successfully merging this pull request may close these issues.

3 participants