Skip to content

devOpifex/r.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

r.nvim

Formatter for R.

Installation

# install.packages("remotes")
remotes::install_github("devOpifex/r.nvim")

Styles

Two styles available:

These can be defined with the .rnvim config file like so:

style=tidy

If this file is fount at the root of your project it is used, otherwise it looks for the file in your home directory (~/.rnvim), if that is not found it takes the function argument default (tidy).

Setup

You can setup for a project with setup("tidy") or setup("grk"). See the previous section to create a system-wide config.

Formatter

To use with conform.nvim.

Use it

local formatters = {
  typescript = {"eslint_d", "prettier",  },
  go = { "gofmt", },
  r = { "styler", },
}

require("conform").setup({
  formatters_by_ft = formatters,
})

{styler} is slow, increase the timeout of your format on save, e.g.:

require("conform").setup({
  format_on_save = {
    -- These options will be passed to conform.format()
    timeout_ms = 2000,
    lsp_fallback = true,
  },
})

About

Formatter for R

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published