jupyter-xeus / xeus-r

Jupyter kernel for the R programming language
Other
41 stars 5 forks source link

Implement `complete_request_impl()` #30

Closed romainfrancois closed 9 months ago

romainfrancois commented 9 months ago

IRkernel implements it in completions.r, this is mostly based on utils:::.guessTokenFromLine.

This can be fine for a first version, but e.g. Rstudio has a richer logic for getting completions, that is %>% and |> aware, but this might involve a lot more work.

For reference, the Rstudio logic is in SessionRCompletions.R and associated C++ files. From experience it is not an easy logic to navigate.

My belief is that a good completion system should live in a separate 📦 that could be accessed from Rstudio, this kernel, etc ... This can easily become a substantial project in itself.