diff --git a/README.md b/README.md index 8a8c52f3..11dfe3a6 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,8 @@ The options `openpdf` and `openhtml` were renamed as `open_pdf` and `open_html`, they now are strings and there with a minor change in how they behave. -The option `nvim_wd` was renamed as `setwd` and it now is a string. +The option `nvim_wd` was renamed as `setwd` and it now is a string and its +default value is "no". There are two new commands: @@ -140,7 +141,7 @@ None yet. Tell us if published a video presenting R.nvim features. The diagram below shows how the communication between Neovim and R works. ![Neovim-R communication](https://raw.githubusercontent.com/jalvesaq/tmp-R-Nvim/master/nvimrcom.svg "Neovim-R communication") -The black arrow represents all commands that you trigger in the editor and +The black arrows represent all commands that you trigger in the editor and that you can see being pasted into R Console. There are three different ways of sending the commands to R Console: diff --git a/doc/R.nvim.txt b/doc/R.nvim.txt index c763eb46..893d729f 100644 --- a/doc/R.nvim.txt +++ b/doc/R.nvim.txt @@ -1527,23 +1527,16 @@ higher value for the variable in your config. Example: ------------------------------------------------------------------------------ 6.27. Start R in working directory of Neovim *setwd* -When you are editing an R file (.R, .Rnw, .Rd, .Rmd, or .qmd) and start R, the -R package nvimcom runs the command `setwd()` with the directory of the file -being edited as argument, that is, the R working directory becomes the same -directory of the R file (option `setwd` = "file"). If you want R's working -directory to be the same as Neovim's working directory, put in your config: +If you want that R starts in the directory of the file that you are editing, +put in your config: >lua - setwd = "nvim" + setwd = "file" < -This option is useful only for those who did not enable 'autochdir'. - -If you prefer that R.nvim does not set the working directory in any way, put -in your config: +If you want that R starts in Neovim's working directory, put in your config: >lua - setwd = "no" + setwd = "nvim" < -The workding directory is not set when running R in a remote machine from a -local Neovim. +The default value of `setwd` is "no". See also 'autochdir'. ------------------------------------------------------------------------------ diff --git a/lua/r/config.lua b/lua/r/config.lua index 292c5895..463f7377 100644 --- a/lua/r/config.lua +++ b/lua/r/config.lua @@ -46,7 +46,7 @@ local config = { max_paste_lines = 20, min_editor_width = 80, non_r_compl = true, - setwd = "file", + setwd = "no", nvimpager = "split", objbr_allnames = false, objbr_auto_start = false,