mistricky / codesnap.nvim

📸 Snapshot plugin with rich features that can make pretty code snapshots for Neovim
MIT License
483 stars 16 forks source link

Add `CodeSnapPreviewOff` and auto close of servers on events #30

Closed daUnknownCoder closed 3 months ago

daUnknownCoder commented 4 months ago

16

CodeSnapPreviewOff Close of server on VimLeavePre, BufDelete, InsertEnter

mistricky commented 4 months ago

Hey @daUnknownCoder, thx for your PR. I'm wondering if this feature is necessary? cause frequently restart the server is an extra overhead compared to just keep the server running

daUnknownCoder commented 4 months ago

Hey @daUnknownCoder, thx for your PR. I'm wondering if this feature is necessary? cause frequently restart the server is an extra overhead compared to just keep the server running

i use many neovim buffers like i open a file i would create a snapshot, the server stays connected even if i changed files or i changed the text so i changed that

daUnknownCoder commented 3 months ago

Hi @mistricky, i wanted to bring light to this feature and the auto close of servers as:

  1. I opened a file with codesnap, there's this filename, acc to my watermark
  2. I opened another filename but the first codesnap buffer is not closed so the watermark gives the first filename, so always close server after use is vital...

Attaching Images:

  1. image

  2. image

2 -> filename is treesitter.lua

my PR solves these problems

mistricky commented 3 months ago

I have planned to refactor this plugin use lower graphic API, the architecture may have break change, this PR is may not be merge for now

mistricky commented 3 months ago

After refactor, there is no preview page anymore, this PR may out of stale, so closed. Thx for your contribute ❤️

daUnknownCoder commented 3 months ago

woah, rust to lua cool...