-
Notifications
You must be signed in to change notification settings - Fork 93
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
Completion only works for packages loaded by default #44
Comments
It works for dplyr::left_join. |
Hi @wngrtn, the language server should know about |
I also find that objects exported by packages attached via |
I don't do anything special. Software Emacs 26.2, latest release of Reproduction steps
(package-initialize)
(require 'eglot)
(require 'ess-site)
(add-hook 'ess-r-mode-hook 'eglot-ensure)
Expected result I should see a bunch of functions starting with Actual result I only see completion suggestions from |
You need to save the file first to allow the language server to "load" the specific packages. |
Saving the file doesn't make any difference; the behavior is still exactly as reported above. |
Oh wait, it does work if I write |
@izahn Thank you for the nice reproducible example! The equivalent process in VSCode works without the second save. That is: open an R file, write |
This does not work for me either in JupyterLab-lsp. I guess that this is because the notebooks as presented to the LSP server only exist as "virtual" documents (sent with with textDocumentSync) rather than actual files on the disk. |
Currently, some features such as completion and caching user functions are only available via @krassowski Could you comment what are working and what are not working in JupyterLab-lsp? |
Thanks for the quick replay! Everything works except for imported symbols, and variables & functions defined within the notebook/file. In particular:
|
@randy3k @izahn I think this might be an eglot issue. The README says that eglot ‘Sends @izahn eglot mentions this in the section contesting it with lsp-model.el, so it might be worth seeing if completions work with that? |
Open issue on eglot for allowing customisation of the time before changes are sent to the language server: joaotavora/eglot#258 |
I have the same problem using languageserver on Sublime Text 3. I only get suggested completions for base and utils packages. I can however get the completions if I start by the package name. E.g. tidyverse::select() The issue is not resolved by saving the file after typing the library function. |
With Emacs, lsp-mode, and company, only some base package functions have completable arguments. E.g., |
We use |
in vscode, there are some problems. |
When using quarto documentation, there is an issue with code autocompletion, which does not provide code suggestions for packages other than base r. The same code highlighting also shows only the function name of the base r |
I use
languageserver
viacoc-r-lsp
and in combination withnvim-r
. Completion works fine for packages that R loads at startup: base, utils, ...I expected getting completion for the functions provided by a package after loading it, e.g. being offered
left_join
as a completion option after runninglibrary(dplyr)
, but that doesn't work.The text was updated successfully, but these errors were encountered: