R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
155 stars 16 forks source link

Not getting description for function argument #87

Closed PMassicotte closed 6 months ago

PMassicotte commented 6 months ago

I am not getting any information/description on function argument. I am missing something?

Peek 2024-03-17 06-52

jalvesaq commented 6 months ago

I get most arguments for lm. I don't get the description of x, y, and model, but I get the description of qr. So, the bug on my side is the need to copy the description when two or more arguments are described together.

PMassicotte commented 6 months ago

I am not getting description for any functions.

jalvesaq commented 6 months ago

The descriptions are saved in the args_ files at ~/.cache/R.nvim. In this case, args_stats_, and you should find a line beginning with lm^F within it, where ^F is the byte x06.

PMassicotte commented 6 months ago

This is what I have:

image

Does it look ok?

jalvesaq commented 6 months ago

I can see ^F instead of empty space:

image

jalvesaq commented 6 months ago

^F (\x06) is used to separate arguments, and ^E (\x05) is used to separate arguments from their descriptions.

PMassicotte commented 6 months ago

I am a bit lost now :) I understand that section are not correctly separated on my side?

PMassicotte commented 6 months ago

There are present, if you zoom on my image, just very pale

jalvesaq commented 6 months ago

So, the problem isn't there...

jalvesaq commented 6 months ago

If I put options(nvimcom.verbose=3) in my ~/.Rprofile, I can see this in the R Console after opening the parenthesis of lm:

nvimcom Received: [E] nvimcom:::nvim_complete_args("2", "lm", "")
send_to_nvim [5] {2553555838}: +A2;;lm;#

The message +A2;;lm;# sent from nvimcom to rnvimserver means that R.nvim should look for arguments for lm and not for something else (a method of another function).

PMassicotte commented 6 months ago

Ok it works now. I am using chezmoi to manage my dotfiles and somehow, I had an older version of cmp-r which pointed to an older branch. All good now, and sorry for that!

jalvesaq commented 6 months ago

Good to know that it wasn't an R.nvim bug, and that you managed to fix it!

jalvesaq commented 6 months ago

I get most arguments for lm. I don't get the description of x, y, and model, but I get the description of qr. So, the bug on my side is the need to copy the description when two or more arguments are described together.

This bug was fixed by https://github.com/R-nvim/R.nvim/commit/268832c8c26bb966ef485dbe58a4d3177a0a85a0

PMassicotte commented 6 months ago

Very nice!

PMassicotte commented 6 months ago

I get most arguments for lm. I don't get the description of x, y, and model, but I get the description of qr. So, the bug on my side is the need to copy the description when two or more arguments are described together.

This bug was fixed by 268832c

Just tested it and it works perfectly.