languageserver_add_to_rprofile: Add language server initialization to '.Rprofile'

Description Usage Arguments Value

View source: R/languageserver_add_to_rprofile.R

Description

Add language server initialization to .Rprofile

Usage

1
2
3
languageserver_add_to_rprofile(rlsLib = getOption("langserver_library"),
  rprofilePath = locate_rprofile(), confirmBeforeChanging = TRUE,
  code = append_code(rlsLib = rlsLib))

Arguments

rlsLib

character(1), path to the library where the languageserver package will be installed.

rprofilePath

character(1), path to the file where to add the initialization code, or NULL. By default, adds the code to a .Rprofile file in the home directory of the current user. Please refer to ?Startup for more details around .Rprofile files.

Notably, if the R_PROFILE_USER environment variable is set, the .Rprofile located in the home directory is ignored, therefore we may want to place the initialization code into the file specified by that variable using the rprofilePath argument in that case.

confirmBeforeChanging

logical(1), if TRUE, asks for user confirmation before changing the file. For non-interactive use, FALSE will skip the confirmation.

code

character(), the code to be added to the file. Defaults to the value of append_code().

Value

side-effects


languageserversetup documentation built on April 14, 2020, 6:59 p.m.