| Type: | Package | 
| Title: | Automated Setup and Auto Run for R Language Server | 
| Version: | 0.1.2 | 
| Maintainer: | Jozef Hajnala <jozef.hajnala@gmail.com> | 
| Description: | Allows to install the R 'languageserver' with all dependencies
    into a separate library and use that independent installation
    automatically when R is instantiated as a language server process.
    Useful for making language server seamless to use without
    running into package version conflicts. | 
| License: | AGPL-3 | 
| Suggests: | tinytest | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 6.0.1 | 
| SystemRequirements: | procps (linux), ps (macos), wmic (windows) | 
| URL: | https://github.com/jozefhajnala/languageserversetup | 
| BugReports: | https://github.com/jozefhajnala/languageserversetup/issues | 
| Language: | en-US | 
| NeedsCompilation: | no | 
| Packaged: | 2020-04-10 08:46:08 UTC; root | 
| Author: | Jozef Hajnala [aut, cre] | 
| Repository: | CRAN | 
| Date/Publication: | 2020-04-10 09:20:02 UTC | 
Add language server initialization to .Rprofile
Description
Add language server initialization to .Rprofile
Usage
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 thelanguageserverpackage will be installed.
 | 
| rprofilePath | character(1), path to the file where
to add the initialization code, orNULL. By default, adds the
code to a.Rprofilefile in the home directory of the current
user. Please refer to?Startupfor more details around.Rprofilefiles.
 Notably, if  the R_PROFILE_USERenvironment variable is set,
the.Rprofilelocated in the home directory is ignored,
therefore we may want to place the initialization code into the
file specified by that variable using therprofilePathargument
in that case. | 
| confirmBeforeChanging | logical(1), ifTRUE, asks for user
confirmation before changing the file. For non-interactive
use,FALSEwill skip the confirmation.
 | 
| code | character(), the code to be added to the file.
Defaults to the value ofappend_code().
 | 
Value
side-effects
Detect whether a process relates to the R Language Server
Description
Detect whether a process relates to the R Language Server
Usage
languageserver_detect(pid, os, langServerProcessPatt, checkParents = TRUE)
Arguments
| pid | integer(1), id of the process to investigate,
usually retrieved bySys.getpid
 | 
| os | character(1), name of the OS, usually retrieved
as the"sysname"element ofSys.info, all lowercase.
 | 
| langServerProcessPatt | character(1), pattern to
recognize the process created bylanguageserver.
 | 
| checkParents | logical(1), ifTRUE, parent processes are also
checked in case whenpidis not the R Language Server process. This
is needed as the linting processes are created with callr as
sub-processes of the main Language Server process.
 | 
Value
logical(1), TRUE if the process with pid (or, optionally,
any of its parents) is detected as the R Language Server process.
Otherwise FALSE.
Install the languageserver package to a separate library
Description
Install the languageserver package to a separate library
Usage
languageserver_install(rlsLib = getOption("langserver_library"),
  strictLibrary = TRUE, fullReinstall = TRUE, fromGitHub = TRUE,
  confirmBeforeInstall = TRUE, dryRun = FALSE, ...)
Arguments
| rlsLib | character(1), path to the library where thelanguageserverpackage will be installed.
 | 
| strictLibrary | logical(1), ifTRUE, all the dependencies
oflanguageserverwill be installed intorlsLib, otherwise
only those that are needed but not present in other libraries
in.libPaths()will be installed.
 | 
| fullReinstall | logical(1). IfTRUE,rlsLibwill be
recursively removed to re-install all the packages cleanly.
 | 
| fromGitHub | logical(1), ifTRUE, will useinstall-github.meto install the current development version
from GitHub. Otherwiseinstall.packages()is used to install
thelanguageserverpackage from CRAN.
 | 
| confirmBeforeInstall | logical(1)ifTRUE, will ask the
user to confirm the steps before installation. For non-interactive
use,FALSEwill skip the confirmation.
 | 
| dryRun | logical(1), ifTRUE, most actions will only be
reported, not taken - nothing will be removed, created or installed.
 | 
| ... | further arguments passed to install.packages()in casefromGitHubis set toFALSE. | 
Value
side-effects
See Also
utils::install.packages()
Remove language server initialization from .Rprofile
Description
Remove language server initialization from .Rprofile
Usage
languageserver_remove_from_rprofile(rlsLib = getOption("langserver_library"),
  rprofilePath = locate_rprofile(), code = append_code(rlsLib = rlsLib),
  confirmBeforeChanging = TRUE)
Arguments
| rlsLib | character(1), path to the library where thelanguageserverpackage will be installed.
 | 
| rprofilePath | character(1), path to the file where
to add the initialization code, orNULL. By default, adds the
code to a.Rprofilefile in the home directory of the current
user. Please refer to?Startupfor more details around.Rprofilefiles.
 Notably, if  the R_PROFILE_USERenvironment variable is set,
the.Rprofilelocated in the home directory is ignored,
therefore we may want to place the initialization code into the
file specified by that variable using therprofilePathargument
in that case. | 
| code | character(), the code to be added to the file.
Defaults to the value ofappend_code().
 | 
| confirmBeforeChanging | logical(1), ifTRUE, asks for user
confirmation before changing the file. For non-interactive
use,FALSEwill skip the confirmation.
 | 
Value
side-effects
Prepare language server to be started
Description
Prepare language server to be started
Usage
languageserver_startup(rlsLib = getOption("langserver_library"),
  langServerProcessPatt = getOption("langserver_processPatt"),
  strictLibrary = TRUE, os = tolower(Sys.info()[["sysname"]]),
  pid = Sys.getpid())
Arguments
| rlsLib | character(1), path to the library where thelanguageserverpackage will be installed.
 | 
| langServerProcessPatt | character(1), pattern to
recognize the process created bylanguageserver.
 | 
| strictLibrary | logical(1), ifTRUE, all the dependencies
oflanguageserverwill be installed intorlsLib, otherwise
only those that are needed but not present in other libraries
in.libPaths()will be installed.
 | 
| os | character(1), name of the OS, usually retrieved
as the"sysname"element ofSys.info, all lowercase.
 | 
| pid | integer(1), id of the process to investigate,
usually retrieved bySys.getpid
 | 
Value
side-effects