posit-dev / positron

Positron, a next-generation data science IDE
Other
1.18k stars 32 forks source link

Use more portable paths in R formatter #3760

Closed juliasilge closed 1 day ago

juliasilge commented 2 days ago

Addresses #3690 in the same manner as we did #2194

QA Notes

This needs to be checked/tested on Windows.

Take some malformed R code like so:

fn <- function() {
  x <- 1
y <- 2
  x + y
}

And then use "Format Document" or (if selected) "Format Selection" from the command palette.

benyamindsmith commented 2 days ago

@juliasilge when I mapped my R keybindings I was expecting my usual ctrl + shift + a shortcut to format malformed code to work, but it does not seem to work.

juliasilge commented 2 days ago

@benyamindsmith I think it's likely you have a keyboard shortcut conflict:

Screenshot 2024-06-30 at 8 16 56 PM

You may want to deactivate the non-formatter one, if that is your preference. You can read more about keyboard shortcut conflicts here.