Open floaterest opened 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.
TypstPreview
--static-file-host 127.0.0.1:0
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.
port
I will be happy to review your PR, make sure to document the functionality in both doc/typst-preview.nvim.txt and README.md :).
doc/typst-preview.nvim.txt
README.md
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.