R: completion not available for tidyverse packages
See original GitHub issuetidyverse
is a collection of some of the most popular packages in R which all play within the “tidy data” framework. library(tidyverse)
reduces the effort to load various tidyverse packages by loading all the core packages at once: ggplot2
, tidyr
, dplyr
, etc. It should be noted that tidyverse
uses a rather sophisticated method to load the dependencies.
The problem: Currently it seems that completion for tidyverse packages is not available on JupyterLab if they are loaded with library(tidyverse)
rather than loaded individually. For example, no completion is suggested for ggplot2’s plotting functions such as geom_*
.
However, developers of R’s languageserver
package have already addressed tidyverse
’s problem, and I can confirm that completion for tidyverse packages works nicely on Vim with the LanguageClient-neovim plugin. So the current issue might be specific to jupyterlab-lsp.
randy3k, languageserver
’s developer, suggests that the problem might have something to do with the following issues:
- REditorSupport/languageserver/issues/15
- REditorSupport/languageserver/issues/27
My environment:
jupyter-lsp
: v0.6.0b0jupyterlab-lsp
: v0.6.1languageserver
®: v0.3.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
I just realized that implementing
textDocument/didSave
is not sufficient to fix this. It is becauselanguageserver
loads the document from the disk upontextDocument/didOpen
andtextDocument/didSave
. It will require some work inlanguageserver
to support virtual documents.@bollwyvl I suspect that we do not need to go so far for this case. LSP offers textDocument/didSave and I think that what Randy meant is that they listen for this signal rather than watch files. Anyways the issue is on us - as far as I remember we do not emit this signal.
But you are right that we need something like this for
pyls
- they userope
for renaming and it works exclusively on the filesystem (and this is why we do not have rename action in notebooks yet - experimented with it a few days ago)Crazy option (1) sounds like the best short-term solution. The question is where and how to write notebooks. Probably we would want plain hidden files in the same directory as notebooks so that advanced refactoring tools do not have a problem with unresolved relative paths.