-
Notifications
You must be signed in to change notification settings - Fork 31
Description
I'm not sure where to report this bug, but I think it's to do with R.nvim: let me know if you think it belongs in https://github.com/eitsupi/arf.
Arf is a nifty new R console: while playing around I noticed it freezes up when I do <C-n> in certain scenarios. I've got a minimal example below. I think it's something to do with how R.nvim processes the global environment?
min_init.lua:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate'
},
{
"R-nvim/R.nvim",
lazy = false,
opts = {
R_app = "arf",
}
}
})- Install arf:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/eitsupi/arf/releases/latest/download/arf-console-installer.sh | sh - Run
nvim -u min_init.lua test.R \rf: confirm arf is working.- Type
iris$and press<C-n>. Also works with anything followed by $, e.g.a$. - neovim seems to freeze up for half a second, while displaying
match in file term://...//59116:arf, then provides the completion list, but thereafter arf isn't responsive.
If I try the example above just running <C-n> on any letter, e.g. a<C-n> it's fine, which is why I suspect something to do with how R.nvim get's the completion for objects from the environment. No idea how to actually debug this though.
EDIT: I can also get this working without doing it on a $: but this requires me to have some database connections set up, so I don't have a minimal example of that.