chomosuke / typst-preview.nvim

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

Feature Request: Custom Preview URL Port #33

Open floaterest opened 1 month ago

floaterest commented 1 month ago

Currently the TypstPreview command will spawn the typst-preview binary with --static-file-host 127.0.0.1:0, which will let typst-preview choose a random port.

https://github.com/chomosuke/typst-preview.nvim/blob/15eaaffc0a2d8cd871f485f399d1d67ed3322a0b/lua/typst-preview/servers/factory.lua#L30-L31

It would be nice if there's an port option in the typst-preview.nvim config for users to choose a port. I'm willing to make an PR for this.

chomosuke commented 1 month ago

I will be happy to review your PR, make sure to document the functionality in both doc/typst-preview.nvim.txt and README.md :).