Given that magics can be registered dynamically, the current approach for JupyterLab-LSP is to replace the magics using predefined, kernel specific regex, see https://github.com/krassowski/jupyterlab-lsp/blob/master/src/magics/defaults.ts .
This also allows to lint bash in shell expressions and R in rpy2 cells created with cell magics. Please also see the documentation/discussion in https://github.com/krassowski/jupyterlab-lsp/blob/master/examples/Magics_and_rpy2.ipynb - I would really want to hear your opinion on this approach. On Tue, 1 Oct 2019, 21:03 Pete Blois, <[email protected]> wrote: > Curious if there is any ongoing effort to adapt a Python LSP engine for > IPython's syntax? > > I haven't delved into all of the issues but it seems like something that > could be beneficial and I'd be interested in helping out. > > On Mon, Sep 30, 2019 at 5:10 PM CrestChristopher < > [email protected]> wrote: > >> Oh yeah, let me do some reading :-) >> On 9/30/2019 7:59 PM, Nicholas Bollweg wrote: >> >> What language are you working in? For IPython, at least, there are >> already some linter integrations published >> <https://github.com/mattijn/pycodestyle_magic>. You can roll your own by >> implementing a magic >> <https://ipython.org/ipython-doc/3/config/custommagics.html>. >> >> Looking forward, there is some good stuff happening towards Language >> Server Protocol integration >> <https://github.com/jupyter/enhancement-proposals/pull/26> on >> jupyterlab-lsp <https://github.com/krassowski/jupyterlab-lsp>, which >> will allow linting things that don't have kernels at all! >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Project Jupyter" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/c3c1ea8a-5c81-44d9-9781-9adc76b7c6ba%40googlegroups.com >> <https://groups.google.com/d/msgid/jupyter/c3c1ea8a-5c81-44d9-9781-9adc76b7c6ba%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Project Jupyter" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/e3decc1a-92cb-81f6-7d39-47349133cc35%40gmail.com >> <https://groups.google.com/d/msgid/jupyter/e3decc1a-92cb-81f6-7d39-47349133cc35%40gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/CACvpcBEmt-8b9Zh16ptOUU6hBMxnfuqJDpwj97%3DwR97OA9QhmA%40mail.gmail.com > <https://groups.google.com/d/msgid/jupyter/CACvpcBEmt-8b9Zh16ptOUU6hBMxnfuqJDpwj97%3DwR97OA9QhmA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAPfyr1%2BSOJ47P%2Bj_chWs9b%3DFQheaNcDyOt-3pxgf2g-Cz-uuJw%40mail.gmail.com.
