R-nvim / R.nvim

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

Fix RSendMotion key mapping #141

Closed smb5 closed 1 month ago

smb5 commented 1 month ago

Fix issues preventing the mapping for RSendMotion (\<LocalLeader>m) from working as intended:

  1. Remove the parentheses in require, as required by v:lua.
  2. Don't append \<CR> to the mapping as it will be used as the motion. Add a boolean parameter to create_maps to accomplish this.
jalvesaq commented 1 month ago

Thank you for your contribution! This is a feature that I don't use, but, in a quick test, the bug seems to be fixed.

I'm getting dozens of warnings from the Lua language server (or Selene) about the function create_maps requiring five arguments. The warnings disappear if a question mark is added to the fifth argument's documentation:

---@param nocr boolean? Don't append "<CR>" to target.

Could you change boolean to boolean?, please?

jalvesaq commented 1 month ago

I added the quotation mark. Thanks for your contribution!

smb5 commented 1 month ago

Thanks! Beat me to it.