Skip to content

Making arf play nicely with R-nvim #110

@adamhsparks

Description

@adamhsparks

Session information (:info output)

# Session Information

arf version:    0.2.4
OS:             macos (aarch64)
Config file:    ~/Library/Application Support/arf/arf.toml
R version:      4.5.2
R_HOME:         /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources
R source:       rig (R 4.5.2)

rig:            installed (4.3-arm64, 4.4-arm64, 4.5-arm64*)
air:            installed

Current mode:   R

R history:      ~/Library/Application Support/arf/history/r.db
Shell history:  ~/Library/Application Support/arf/history/shell.db

## Environment Variables

R_LIBS_USER:     ~/Library/R/arm64/4.5/library
R_LIBS_SITE:     /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/site-library

Description

It seems that R-nvim uses a -f flag when calling R and expects Arf to accept it?

before_rns.R stderr: error: unexpected argument '-f' found  
tip: to pass '-f' as a value, use '-- -f'
Usage: arf [OPTIONS] [SCRIPT] [COMMAND]For more information, try '--help'.

Time:
  unix setup: 0.006297791
  check health (async): 0.003489375
  before_rns.R (async): 0.012625375
  global setup: 0.011092834
before_rns.R stdout: (empty)
Language detection in a Quarto document:
  Correctly detected: yaml
  Correctly detected: markdown
  Correctly detected: markdown_inline
  Correctly detected: r
Language detection in an Rnoweb document:
  Correctly detected: latex
  Correctly detected: chunk_header
  Correctly detected: r
  Correctly detected: chunk_end

I note that this only occurs so far in Kitty using a Kitty split window, it won't occur if I use the built-in Neovim terminal that automatically launches in the terminal emulator. I'm just trying to get {terminalgraphics} set up for use given the recent issues with {httpgd} on CRAN.

This is not urgent, just nice to have.

Steps to reproduce

  1. Start Neovim with R-nvim plugin installed.
  2. Open an R file.

Expected behavior

Arf launches like an R console in the nvim window in a separate panel.

Actual behavior

Arf fails to launch, no R console appears.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions