chomosuke / typst-preview.nvim

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

Live preview isn't working #8

Closed stevenxxiu closed 9 months ago

stevenxxiu commented 9 months ago

The first render works, however:

To test:

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.

VoxelMC commented 9 months ago

I am also experiencing this.

wisp3rwind commented 9 months ago

Same here.

This sounds a bit like https://github.com/Enter-tainer/typst-preview/issues/81, but that should be fixed.

chomosuke commented 9 months ago

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.

stevenxxiu commented 9 months ago

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!

VoxelMC commented 9 months ago

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 :)

wisp3rwind commented 9 months ago

Also working for me now — maybe it's https://github.com/Enter-tainer/typst-preview/pull/212, which fixes https://github.com/Enter-tainer/typst-preview/issues/211?