markmap / coc-markmap

https://markmap.js.org/
MIT License
215 stars 15 forks source link

`open` is not available on all systems #1

Closed argshook closed 4 years ago

argshook commented 4 years ago

Hello, thanks for a great plugin!

First try i had an issue, plugin didn't seem to work for me.

Looking at source i saw this line:

https://github.com/gera2ld/coc-markmap/blob/master/src/index.ts#L45

  if (open) nvim.command(`silent !open ${filename}`);

this is an assumption that environment has open executable. In my case it doesn't, and i saw no output.

ideally it should first check if open is found and else, perhaps fallback to $BROWSER?