jalvesaq / Nvim-R

Vim plugin to work with R
GNU General Public License v2.0
965 stars 125 forks source link

Should arguments completion and omni completion be merged? #260

Closed jalvesaq closed 6 years ago

jalvesaq commented 6 years ago

Nvim-R has two completion functions, CompleteR and RCompleteArgs. Now (after https://github.com/jalvesaq/Nvim-R/commit/b7224c6601de06db15f2b42ffa00c5effd6ef719) RCompleteArgs also includes objects from R Workspace and loaded libraries in the completion list that pops up after <C-X><C-A>. I can no longer see why we should have two completion functions, and I think that RCompleteArgs can replace CompleteR as the omni function triggered by <C-X><C-O>.

Does anyone see any reason to keep both functions? @gaalcaras what do you think?

jalvesaq commented 6 years ago

I have merged CompleteR and RCompleteArgs on this branch: https://github.com/jalvesaq/Nvim-R/tree/omni_one

gaalcaras commented 6 years ago

I agree, I think it's best to keep only one mapping to trigger completion. I've briefly tested the feature branch and it worked as expected.

Maybe RCompleteArgs should be renamed CompleteR, since it will basically complete everything?

Anyhow the R_complete option is pretty cool, I think I'll use it in ncm-R at some point.

jalvesaq commented 6 years ago

@gaalcaras Thanks for your comments!

Maybe RCompleteArgs should be renamed CompleteR, since it will basically complete everything?

Yes, this was what I did.

jalvesaq commented 6 years ago

The functions are merged in the master branch: https://github.com/jalvesaq/Nvim-R/commit/3f156f4f02d674e37a1f9d176de03201363c3a08