jalvesaq / Nvim-R

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

Add some code documentation inside nvimrserver.c #791

Closed she3o closed 10 months ago

she3o commented 11 months ago

This PR involves a lot of human guessing and/or using GPT-4. I would be surprised if we got everything right.

let me know If I should change anything. My formatter roasted a bit of the whitespace. I tried to undo most of the damage but I couldn't revert some whitespace changes.

she3o commented 11 months ago

I took the liberty of creating a CONTRIBUTING.md so everyone can have the same formatting rules for different filetypes. :blush:

jalvesaq commented 11 months ago

Thanks! This is something that I should have done... Some notes:

"void send_to_nvimcom(char *msg) // Function to send messages to Nvim-R"

Nvim-R is the Vim plugin + nvimcom library. The above function sends a message from the plugin (Nvim-R) to the R package (nvimcom). So, it will be more precise or, at least, not ambiguous "Function to send messages to R" or "to nvimcom".

jalvesaq commented 10 months ago

I adopted the LLVM style with a 4-space indent because it seems to be the closest to what I was using.