R-nvim / R.nvim

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

[`pdfviewer`] Add support for or make default: `vim.ui.open` #145

Closed Aman9das closed 1 month ago

Aman9das commented 1 month ago

pdfviewer is hardcoded to zathura currently, but that does not support flatpaks for example, even if zathura is installed.

The neovim lua way of opening files and urls is [vim.ui.open](https://neovim.io/doc/user/lua.html#vim.ui.open()) and it opens pdf files in the system pdf viewer quite well. It is the way gx works too since neovim 0.10

Kindly make it possible to make vim.ui.open the pdfviewer, maybe by setting the string to "vim" or even better making it the default.

PMassicotte commented 1 month ago

Duplicated of #144

jalvesaq commented 1 month ago

@Aman9das, could you, please, report if https://github.com/R-nvim/R.nvim/pull/144 works for you, and what's your operating system?

Aman9das commented 1 month ago

Works quite well! I am on NixOS (linux)