chomosuke / typst-preview.nvim

Low latency typst preview for Neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Live preview isn't working

stevenxxiu opened this issue · comments

The first render works, however:

  • I can't get live preview to work.
  • Scrolling in the browser does nothing in the editor.

To test:

  • I create a file with 1 in it.
  • Run :TypstPreview. This opens up a browser tab.
  • Change the 1 to 2 and save.
  • The live preview doesn't change.

I also tried to have this plugin as my only Lazy plugin, but the same thing occurs.

My config:

return {
  'chomosuke/typst-preview.nvim',
  lazy = false,
  version = '0.1.*',
  opts = {
    debug = true,
  },
  build = function() require 'typst-preview'.update() end,
}

My messages.

I am also experiencing this.

Same here.

This sounds a bit like Enter-tainer/typst-preview#81, but that should be fixed.

Hi,

Sorry for the late response.

I followed your steps and am unable to reproduce your issue. The preview on my machine updated as soon as I replaced 1 with2.

Here are my messages, I can not spot any differences except that I have 4 TypstActor log and you only have 2.
message.txt

This looks like an upstream issue, if you can reproduce the same problem with the VSCode plugin (using the same browser) then please do open an issue in https://github.com/Enter-tainer/typst-preview.

This can also be an browser or OS specific issue. Fyi I uses chrome on Arch.

Hi interesting, it seems to work now. I'm not really sure what I didn't do right before. Here's my config now:

return {
  'chomosuke/typst-preview.nvim',
  lazy = true,
  ft = 'typst',
  opts = {
    get_root = function(bufnr)
      return vim.api.nvim_buf_get_name(bufnr):match('(.*/)')
    end,
  },
  build = function()
    require('typst-preview').update()
  end,
}

I'm also on Arch Linux, with Vivaldi 6.5.3206.50-1.

Thanks for the plugin!

Hi interesting, it seems to work now. I'm not really sure what I didn't do right before. Here's my config now:

return {
  'chomosuke/typst-preview.nvim',
  lazy = true,
  ft = 'typst',
  opts = {
    get_root = function(bufnr)
      return vim.api.nvim_buf_get_name(bufnr):match('(.*/)')
    end,
  },
  build = function()
    require('typst-preview').update()
  end,
}

I'm also on Arch Linux, with Vivaldi 6.5.3206.50-1.

Thanks for the plugin!

This also fixed it for me - life saver! Have a great day :)

Also working for me now — maybe it's Enter-tainer/typst-preview#212, which fixes Enter-tainer/typst-preview#211?