Closed jalvesaq closed 4 months ago
Is autocomplete working at this time? I am thinking to slowly transition to tmp-R-Nvim to test more in depth.
My config at the moment:
return {
'jalvesaq/cmp-nvim-r',
branch = 'rnvim',
config = function()
require('cmp_r').setup {
filetypes = { 'r', 'rmd', 'quarto' },
doc_width = 150,
}
end,
}
Yes, it's working almost since the beginning because it's already written in Lua.
ok cool, one thing I forgot was that (was FALSE):
languageserver.server_capabilities =
list(
completionProvider = TRUE,
completionItemResolve = TRUE
),
Now I am getting that on key press (so looks like cmp is trying to do something at least)
I will dig that out.
You have to replace "cmp_nvim_r" with "cmp_r" in the cmp config.
This is what I have in my nvim-cmp.lua config:
sources = {
{ name = 'nvim_lsp', keyword_length = 1 },
{ name = 'cmp_r', keyword_length = 1 },
-- { name = 'nvim_lsp_signature_help' },
{ name = 'languageserver' },
{ name = 'luasnip' },
{ name = 'cmp_zotcite' },
{ name = 'omni' },
{ name = 'cssls' },
{ name = 'dockerls' },
{ name = 'json_lsp' },
{ name = 'marksman' },
{ name = 'crates' },
{ name = 'otter' },
-- { name = 'path' },
-- { name = 'Buffer' },
{
name = 'path',
option = {
trailing_slash = true,
get_cwd = function(_)
return vim.fn.getcwd()
end,
},
},
{ name = 'buffer' },
},
I also have this issue with Rust, so not about nvimr. So it is on my side.
R-Nvim will rely on
cmp-r
for auto-completion, but we can use the branch rnvim of `cmp-nvim-r' while we don't create the R-Nvim organization.