languageserversetup

Setup and initialize R language server seamlessly and automatically with editors such as VS Code across platforms.

CRAN Dependencies License Coverage Check-CRAN Check-Solaris

Deploy-MS-Win Deploy-MacOS Deploy-CRAN Deploy-Dev

Features

Installation

You can install languageserversetup from CRAN. It has no dependencies, so no other packages are installed:

install.packages("languageserversetup")

You can also install the latest development version from the master branch on GitHub using the remotes package:

remotes::install_github("jozefhajnala/languageserversetup")

Usage

  1. Install the languageserver package and all it’s dependencies into a separate independent library (Will ask for confirmation before taking action)
languageserversetup::languageserver_install()
  1. Add code to .Rprofile to automatically instantiate languageserver if the process is an instance of the languageserver, otherwise, the R session will run as usual with library paths unaffected
languageserversetup::languageserver_add_to_rprofile()
  1. Enjoy the cool functionality with VS Code or other editors

In action with VS Code

Install languageserversetup and use languageserver_install()

Installing the language server

Initialize the functionality with languageserver_add_to_rprofile()

Adding the language server to startup

All done, enjoy the awesomeness!

Platform support

Currently, the functionality is tested on 64bit versions of MS Windows 7, 10, Ubuntu 18.10 and MacOS El Capitan. Automated deployments and tests run via GitHub actions on macos-elcapitan-release, windows-x86_64-devel, ubuntu-gcc-release and fedora-clang-devel.

All PR and issues related to platform support are most welcome!

Removing the functionality

To remove the functionality, run (Will ask for confirmation before taking action):

languageserversetup::languageserver_remove_from_rprofile()

If the above does not succeed, remove the languageserersetup related code from your .Rprofile. Optionally, you can also delete the library where languageserver was installed itself.

Customizing the behavior

Location of the languageserver library

Used .Rprofile

By default, an .Rprofile file located in the user’s home directory is used. If it does not exist, it is created. If it does exist, code is appended to the end of the file (after user confirmation).

Development or CRAN version of languageserver?

The languageserver_install() function has a fromGitHub argument. Set it to FALSE to install the CRAN version of the languageserver package. Otherwise, the latest development version is installed from the master branch of the languageserver GitHub repository.

Options

The default package behavior can be adjusted by the following options, ideally placed in the .Rprofile file before the call to library(languageserversetup)

How does it work, extra options and arguments

Please refer to the help files:

?languageserver_install
?languageserver_startup
?languageserver_add_to_rprofile
?languageserver_remove_from_rprofile

Acknowledgments

License

AGPL-3