Autocompletions in markdown cells

I want to make autocompletions available when typing in markdown cells, but it currently only works in python cells. Is there any way to enable autocompletions in markdown cells through a typescript extension? I looked at the completer documentation and it has a ‘register’ function, but it isn’t clear if that registers cell types for autocompletion.

Hi @jaysun_n, as you mention, autocompletion in notebooks is only available for code cells. See completer-extension.

You might create an extension for autocompletion in markdown cells by copying the @jupyterlab/completer-extension:notebooks plugin and adapt it for markdown.

To adapt the plugging, you need to change this line to active your completer only in markdown cells, create a custom connector for markdown items and register it here.

If you create this extension, maybe you will need to open a PR to JupyterLab to make sure that here and here, the completer-extension only registers a completer when the editor is a code cell, otherwise markdown cells will have two completers.

1 Like

Additionally, we’re interested in adding this, backed by an appropriate language server for jupyterlab-lsp, such that one would get autocompletion, linting, jump-to-definition, etc. as well as the above for inline code cells, $LaTeX$, etc.

The “appropriate language server” part is a bit tenuous, as the one we currently support is nodejs-based, and has some pretty specific requirements to get e.g. spell checking, etc. Some future work would re-purpose the myst-parser (which critically can be made to expose line/col numbers) with pygls.

1 Like