[RDY] Improve neovim.rb

As discussed in https://github.com/neovim/neovim/pull/915. I recreate this PR to spilt it into two commits: one for style change and one for functionality change.