Skip to content

Commit

Permalink
add check for box.lsp before applying languageserver options
Browse files Browse the repository at this point in the history
  • Loading branch information
radbasa committed Sep 18, 2024
1 parent 88a416a commit 2970b3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rhino
Title: A Framework for Enterprise Shiny Applications
Version: 1.10.0.9000
Version: 1.10.0.9001
Authors@R:
c(
person("Kamil", "Żyła", role = c("aut", "cre"), email = "[email protected]"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# rhino (development version)

* Added check for `box.lsp` package in `.Rprofile` before applying the `languageserver` options.

# [rhino 1.10.0](https://github.com/Appsilon/rhino/releases/tag/v1.10.0)

See _[How-to: Rhino 1.10 Migration Guide](https://appsilon.github.io/rhino/articles/how-to/migrate-1-10.html)_
Expand Down
10 changes: 6 additions & 4 deletions inst/templates/renv/dot.Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ if (file.exists("renv")) {
options(box.path = getwd())

# box.lsp languageserver external hook
options(
languageserver.parser_hooks = list(
"box::use" = box.lsp::box_use_parser
if (nzchar(system.file(package = "box.lsp"))) {
options(
languageserver.parser_hooks = list(
"box::use" = box.lsp::box_use_parser
)
)
)
}

0 comments on commit 2970b3d

Please sign in to comment.