R-nvim / R.nvim

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

Setting pipe_keymap not working #151

Closed joihci closed 1 week ago

joihci commented 1 week ago

I'm trying to change the keybind for inserting the pipe operator |>.

I'm not sure I understand the documentation correctly as per 6.5. Assignment pipe operators but I set pipe_keybind as a global variable. If I open a .R file with nvim and run :let g: I can see the variable correctly set. However it has no effect on the behaviour of the pipe keybind. Setting it to "" does not unbind the default <space>, (space is set as leader) keybind and setting it to "<M-,>" as is my intention does not work.

Is this a bug or am I doing something wrong?

Info:

Any more info I should provide about my setup?

jalvesaq commented 1 week ago

As usual with Lua plugins, R.nvim is not configured by global variables. You have to create a Lua table with your options and pass it to require("r").setup(). Please, see the examples in the README, and the Wiki.

joihci commented 1 week ago

Great, thanks!

Solved with lua require("r").setup({ pipe_keymap = "<M-,>" }) in init.vim