@@ -509,7 +509,7 @@ lists are built. To suppress these messages, add the following to your
509509<
510510
511511------------------------------------------------------------------------------
512- 4.4.1. Quarto YAML completion *R.nvim-quarto-completion*
512+ 4.4.1. Quarto YAML completion *R.nvim-quarto-completion*
513513
514514R.nvim provides intelligent YAML completion for Quarto documents and project
515515files through integration with the YAML Language Server (yamlls). This feature
@@ -562,8 +562,8 @@ Neovim applies the built-in `LspReferenceText`, `LspReferenceRead`, and
562562`LspReferenceWrite` highlight groups. You can customise them in your
563563`init.lua ` . For example:
564564>lua
565- vim.api.nvim_set_hl(0, "LspReferenceText", { bg = "#3F5865", fg = "white" })
566- vim.api.nvim_set_hl(0, "LspReferenceRead", { link = "LspReferenceText" })
565+ vim.api.nvim_set_hl(0, "LspReferenceText", { bg = "#3F5865", fg = "white" })
566+ vim.api.nvim_set_hl(0, "LspReferenceRead", { link = "LspReferenceText" })
567567 vim.api.nvim_set_hl(0, "LspReferenceWrite", { bg = "#3a5a7a", fg = "white" })
568568<
569569Whether highlights are triggered automatically on `CursorHold ` or manually
@@ -678,8 +678,9 @@ following:
678678 in the R Console, run either `debug (funcname)` or `debugonce (funcname)`
679679 where `funcname` is the name of the function (not quoted). R.nvim will
680680 send this command to R Console if you press <LocalLeader> bg in Normal
681- mode with the cursor over the function name. Use `<LocalLeader> ud` with the cursor on a function to undebug it. An example of using
682- `browser` is shown later in the documentation.
681+ mode with the cursor over the function name. Use `<LocalLeader> ud` with
682+ the cursor on a function to undebug it. An example of using `browser` is
683+ shown later in the documentation.
683684
684685 3. Call the function.
685686
@@ -992,7 +993,7 @@ You may close the window opened by `:RConfigShow` by simply pressing `q`.
992993| rmarkdown_args | Further options to be passed to `rmarkdown:: render ()`
993994| quarto_render_args | Options to be passed to `quarto:: quarto_render ()`
994995| quarto_preview_args | Options to be passed to `quarto:: quarto_preview ()`
995- | chunk_hl | How to highlight chunks in Quarto, Rmd, Rnoweb and Rtypst
996+ | chunk_hl | Chunk highlighting in Quarto, Rmd, Rnoweb and Rtypst
996997| clear_line | Clear R Console line before sending a command
997998| editing_mode | The mode defined in your `~/.inputrc `
998999| pdfviewer | PDF application used to open PDF documents
@@ -1158,10 +1159,10 @@ options:
11581159 7. alacritty
11591160 8. xterm
11601161
1161- If the value of `external_term` is `" default" ` , the plugin runs the first terminal
1162- emulator that it finds from the above list. If your favorite terminal emulator
1163- is not selected, you may define it in your config. Below are some examples of
1164- how to set the value of `external_term` :
1162+ If the value of `external_term` is `" default" ` , the plugin runs the first
1163+ terminal emulator that it finds from the above list. If your favorite terminal
1164+ emulator is not selected, you may define it in your config. Below are some
1165+ examples of how to set the value of `external_term` :
11651166>lua
11661167 external_term = "default" -- Run R in an external terminal
11671168 external_term = "konsole" -- Run R in konsole
@@ -1201,7 +1202,8 @@ be used to run R in a split pane. Examples:
12011202Note: for `external_term = "kitty_split"`, Kitty must be ready to receive
12021203remote commands. Example:
12031204>sh
1204- kitty --instance-group "kitty_sock" -o allow_remote_control=yes --listen-on unix:/tmp/.kitty_sock
1205+ kitty --instance-group "kitty_sock" -o allow_remote_control=yes \
1206+ --listen-on unix:/tmp/.kitty_sock
12051207<
12061208You will also need the option `enabled_layouts splits` in your Kitty config.
12071209
@@ -1229,7 +1231,8 @@ If R cannot find either `make` or `gcc` while trying to compile nvimcom, you
12291231should add their directories to the beginning of the `PATH` environment
12301232variable in your | init.lua | . Example:
12311233>lua
1232- vim.env.PATH = "C:\\rtools45\\mingw64\\bin;C:\\rtools45\\usr\\bin;" .. vim.env.PATH
1234+ vim.env.PATH = "C:\\rtools45\\mingw64\\bin;C:\\rtools45\\usr\\bin;" ..
1235+ vim.env.PATH
12331236<
12341237The plugin sets `$HOME ` as the Windows register value for "Personal" "Shell
12351238Folders" which is the same value set by R. However, if you have set `$HOME `
@@ -1258,15 +1261,15 @@ Valid values are "native" and "magrittr":
12581261<
12591262
12601263------------------------------------------------------------------------------
1261- 6.6. Object Browser and completion options *objbr_w*
1262- *objbr_h*
1263- *objbr_place*
1264- *objbr_opendf*
1265- *objbr_openlist*
1266- *objbr_allnames*
1267- *compl_data*
1268- *objbr_mappings*
1269- *objbr_placeholder*
1264+ 6.6. Object Browser and completion options *objbr_w*
1265+ *objbr_h*
1266+ *objbr_place*
1267+ *objbr_opendf*
1268+ *objbr_openlist*
1269+ *objbr_allnames*
1270+ *compl_data*
1271+ *objbr_mappings*
1272+ *objbr_placeholder*
12701273By default, the Object Browser will be created at the right of the script
12711274window, and with 40 columns. Valid values for the Object Browser placement are
12721275the combination of either "script" or "console" and "right", "left", "above",
@@ -1352,17 +1355,21 @@ change.
13521355Completion lists are built in parallel, using all but two of the cores
13531356reported by `parallel: : detectCores ()` . On systems where this number does not
13541357reflect the resources actually available to the process, like an HPC
1355- cluster where CPUs are allocated as portions of the total available on the hardware,
1356- you can cap the number of cores with the `nvimcom.max_cpu_cores` option in your ~/.Rprofile:
1358+ cluster where CPUs are allocated as portions of the total available on the
1359+ hardware, you can cap the number of cores with the `nvimcom.max_cpu_cores`
1360+ option in your ~/.Rprofile:
13571361>r
13581362 options(nvimcom.max_cpu_cores = 4)
13591363
1360- This value can come from environment variables. For example, on an HPC cluster using
1361- the Slurm scheduler, you can set the option to the value of the environment variable `SLURM_CPUS_PER_TASK` or, if it's not available (for example, you have not specified
1362- `cpus- per- task` for the job and only get the default number of CPUs), then fall back to 2:
1364+ This value can come from environment variables. For example, on an HPC cluster
1365+ using the Slurm scheduler, you can set the option to the value of the
1366+ environment variable `SLURM_CPUS_PER_TASK` or, if it's not available (for
1367+ example, you have not specified `cpus- per- task` for the job and only get the
1368+ default number of CPUs), then fall back to 2:
13631369
13641370>r
1365- options(nvimcom.max_cpu_cores = max(2, as.numeric(Sys.getenv("SLURM_CPUS_PER_TASK"))))
1371+ options(nvimcom.max_cpu_cores =
1372+ max(2, as.numeric(Sys.getenv("SLURM_CPUS_PER_TASK"))))
13661373
13671374It is possible to add a custom keymap through `objbr_mappings` table. The
13681375keymap defined in this table will be available in the object browser only.
@@ -1417,18 +1424,19 @@ browser. Here you should define `objbr_placeholder` in your `config` table.
14171424 },
14181425 objbr_placeholder = '@@'
14191426<
1420- One might need to use special keys (e.g., <localleader> , <CR> , etc) when defining a
1421- keymap. Lua allows the use *bracket notation* to use non-alphanumeric
1422- characters in table keys.
1427+ One might need to use special keys (e.g., <localleader> , <CR> , etc) when
1428+ defining a keymap. Lua allows the use *bracket notation* to use
1429+ non-alphanumeric characters in table keys.
14231430>lua
14241431 objbr_mappings = {
14251432 ['<localleader> gg'] = 'head({object} , 30)',
14261433 },
14271434<
1428- You can also bind keys to Lua functions. For example, the following example binds
1429- `e ` to an anonymous function that fetches the definition of an R function
1430- under the cursor and opens it in a new vim buffer. The code also binds `v ` in the
1431- object browser to toggle between the two view (i.e., `.Globalenv` and `Libraries` ).
1435+ You can also bind keys to Lua functions. For example, the following example
1436+ binds `e ` to an anonymous function that fetches the definition of an R
1437+ function under the cursor and opens it in a new vim buffer. The code also
1438+ binds `v ` in the object browser to toggle between the two view (i.e.,
1439+ `.Globalenv` and `Libraries` ).
14321440>lua
14331441 objbr_mappings = {
14341442 ['<localleader> gg'] = 'head' ,
@@ -1443,10 +1451,12 @@ object browser to toggle between the two view (i.e., `.Globalenv` and `Libraries
14431451 return
14441452 end
14451453
1446- local temp_file = config.tmpdir .. '/function_def_' .. vim.env.RNVIM_ID .. '.R'
1454+ local temp_file = config.tmpdir .. '/function_def_' ..
1455+ vim.env.RNVIM_ID .. '.R'
14471456
14481457 -- Send R command to write the function definition to a temp file
1449- local cmd = string.format('writeLines(deparse(%s), "%s")', object_name, temp_file)
1458+ local cmd = string.format('writeLines(deparse(%s), "%s")',
1459+ object_name, temp_file)
14501460 require('r.send').cmd(cmd)
14511461
14521462 -- Wait for R to execute the command and write the file
@@ -1518,7 +1528,8 @@ path to R in your config as in the examples:
15181528 R_path = "/path/to/my/preferred/R/version/bin"
15191529 R_path = "C:\\Program Files\\R\\R-4.3.3\\bin\\x64"
15201530<
1521- On Windows, Neovim will try to find the R install path in the Windows Registry.
1531+ On Windows, Neovim will try to find the R install path in the Windows
1532+ Registry.
15221533
15231534The `R_path` variable can also be prefixed to the `PATH` environment variable.
15241535So, it can include more than one directory separated by a `;` on Windows or a
@@ -1529,7 +1540,7 @@ RTools `bin` directories on Windows. Example:
15291540<
15301541By default `R_cmd` is `" R" ` (the same as `R_app` ) and will be used to run some
15311542scripts in the background, such as:
1532- >
1543+ >sh
15331544 R CMD build nvimcom
15341545 R CMD install nvimcom
15351546 R CMD BATCH current_script.R
@@ -1603,7 +1614,7 @@ features in your R.nvim config. Below are the default values:
16031614 signature = true, -- enable the signature help provider
16041615 implementation = true, -- enable the implementation provider
16051616 definition = true, -- enable the definition provider
1606- use_git_files = true, -- use git to find R files, skipping gitignored files
1617+ use_git_files = true, -- use git to find R files
16071618 references = true, -- enable the references provider
16081619 document_highlight = true, -- enable the document highlight provider
16091620 document_symbol = true, -- enable the document symbol provider
@@ -1783,8 +1794,8 @@ you should put in your config:
17831794>lua
17841795 R_prompt_str = "»"
17851796<
1786- Similarly, if the `continue ` option in your `~/.Rprofile ` has ANSI scape codes,
1787- you should set the value of `R_continue_str` . Example:
1797+ Similarly, if the `continue ` option in your `~/.Rprofile ` has ANSI scape
1798+ codes, you should set the value of `R_continue_str` . Example:
17881799>lua
17891800 R_continue_str = "…"
17901801<
@@ -1963,7 +1974,7 @@ Console with the option `max_paste_lines` (default value = 20).
19631974
19641975To produce a PDF document from the .tex file generated by either `Sweave ()` or
19651976`knit ()` command, R.nvim calls:
1966- >
1977+ >sh
19671978 latexmk -pdf -pdflatex="xelatex %O -file-line-error -interaction=nonstopmode -synctex=1 %S"
19681979<
19691980If `xelatex` is not installed, it will be replaced with `pdflatex` in the
@@ -2397,8 +2408,8 @@ The substring `%s` is replaced by the name of the object under the cursor, and
23972408The data will be displayed in a new tab. Change the value of `how` to "split"
23982409or "vsplit" to display the data in a split window.
23992410
2400- If the default field delimiter (`\t ` ) causes problems in your case, you can change it
2401- in your config. Valid values are `" \t " ` , `" ;" ` and `" ," ` . Example:
2411+ If the default field delimiter (`\t ` ) causes problems in your case, you can
2412+ change it in your config. Valid values are `" \t " ` , `" ;" ` and `" ," ` . Example:
24022413>lua
24032414 csv_sep = ","
24042415<
@@ -2542,8 +2553,8 @@ Current available functions are:
25422553>lua
25432554 path_split_fun = { "here::here", "here", "file.path", "fs::path", "path" }
25442555
2545- If the target string is detected as a URL, it will be split using the '/' character.
2546- will be handled using the `paste0 ()` function.
2556+ If the target string is detected as a URL, it will be split using the '/'
2557+ character. will be handled using the `paste0 ()` function.
25472558
25482559
25492560------------------------------------------------------------------------------
@@ -2583,14 +2594,14 @@ not want this, put in your config:
25832594 debug_jump = false
25842595<
25852596The highlighted debugged line incrementally moves down the buffer with code
2586- execution and, with long scripts, it may stay at the bottom of the window as you
2587- debug. You can hold the highlighted line in the middle of the window with
2597+ execution and, with long scripts, it may stay at the bottom of the window as
2598+ you debug. You can hold the highlighted line in the middle of the window with
25882599>lua
25892600 debug_center = true
25902601<
25912602
25922603------------------------------------------------------------------------------
2593- 6.43. Code chunk languages *chunk_langs*
2604+ 6.43. Code chunk languages *chunk_langs*
25942605
25952606By default, R.nvim supports sending R, Python, Bash, and SQL code chunks
25962607from Quarto and R Markdown documents to R. You can add support for
@@ -2663,15 +2674,15 @@ The Lua internals for R.nvim should be considered generally unstable and
26632674subject to change without notice. There are some exceptions to this rule,
26642675which are declared stable for the benefit of users:
26652676
2666- r.run.action(rcmd, mode, args) *r.run.action()*
2677+ r.run.action(rcmd, mode, args) *r.run.action()*
26672678 Calls an R function on the word currently under the cursor
26682679
26692680 Parameters: ~
26702681 {rcmd} (string) The name of an R function
26712682 {mode} (string) The current mode (`" n" ` or `" v" ` )
26722683 {args} (string) Extra arguments to pass to `rcmd`
26732684
2674- r.send.cmd(command) *r.send.cmd()*
2685+ r.send.cmd(command) *r.send.cmd()*
26752686 Calls an R function on the word currently under the cursor
26762687
26772688 Parameters: ~
@@ -2790,5 +2801,3 @@ See: https://www.vim.org/scripts/script.php?script_id=2628
27902801
27912802
27922803vim:tw=78:ts=8:ft=help:norl
2793-
2794-
0 commit comments