.Rprofile
Add language server initialization to .Rprofile
languageserver_add_to_rprofile(rlsLib = getOption("langserver_library"),
rprofilePath = locate_rprofile(), confirmBeforeChanging = TRUE,
code = append_code(rlsLib = rlsLib))
character(1)
, path to the library where the
languageserver
package will be installed.
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.
logical(1)
, if TRUE
, asks for user
confirmation before changing the file. For non-interactive
use, FALSE
will skip the confirmation.
character()
, the code to be added to the file.
Defaults to the value of append_code()
.
side-effects