chomosuke / typst-preview.nvim

Low latency typst preview for Neovim
GNU General Public License v3.0
218 stars 14 forks source link

Choose which browser to open the preview's page #37

Closed aabbccddeeffggj closed 1 month ago

aabbccddeeffggj commented 1 month ago

Hi, thanks for this plugin, pretty easy to setup.

There are these lines of code in the plugin's files:

local open_cmd
if M.is_macos() then
  open_cmd = 'open'
elseif M.is_windows() then
  open_cmd = 'explorer.exe'
elseif M.is_wsl() then
  open_cmd = '/mnt/c/Windows/explorer.exe'
else
  open_cmd = 'xdg-open'
end

In my case, xdg-open is used, which makes the preview open through the mime-type of my main internet browser, but I wish to open it with another browser (thus specify which command to use, instead of xdg-open).

Could you add a configuration option to use a custom command instead?

chomosuke commented 1 month ago

Hello there, This options already exist and it's implemented by #11. Thank you