question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

R: completion not available for tidyverse packages

See original GitHub issue

tidyverse 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.0b0
  • jupyterlab-lsp: v0.6.1
  • languageserver ®: v0.3.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
randy3kcommented, Nov 6, 2019

I just realized that implementing textDocument/didSave is not sufficient to fix this. It is because languageserver loads the document from the disk upon textDocument/didOpen and textDocument/didSave. It will require some work in languageserver to support virtual documents.

1reaction
krassowskicommented, Nov 6, 2019

@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 use rope 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tidyverse package is not working - RStudio Community
Hi When i'm loading the library tidyverse, i'm getting below error Error: package or namespace load failed for 'tidyverse' in loadNamespace(i, c(lib.loc, ....
Read more >
Auto completion does not work in a dplyr pipe when ... - GitHub
Problem: the column names for the data.frame that is piped into filter() are not shown in the auto-complete list.
Read more >
package 'tidyverse' is not available - Stack Overflow
packages ("tidyverse", dependencies=TRUE, type="source"), I am getting the below error - Installing package into '/home/nbcommon/R' (as 'lib' is ...
Read more >
Updates for recipes extension packages - Tidyverse
We're tickled pink to announce the releases of extension packages that followed the recent release of recipes 0.2.0. recipes is a package ......
Read more >
Installation and setup - Data processing with R tidyverse
is available for free for Windows, GNU/Linux and macOS. ... for example for a new feature or if a bug was fixed but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found