mistricky / codesnap.nvim

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

feat(custom watermark) #96

Closed Mr-LLLLL closed 1 month ago

Mr-LLLLL commented 1 month ago

93

Mr-LLLLL commented 1 month ago

maybe custom watermark by use lua function is good than set to cwd

mistricky commented 1 month ago

Hi @Mr-LLLLL, thx for this contribution. Yes, allowing users to pass a function to dynamically calculate what watermark should display is a really useful feature.

However, the design of the watermark allows users to add custom symbols or something on their screenshots, thus it will make screenshots more personalized. I will merge this PR but the feature request mentioned on https://github.com/mistricky/codesnap.nvim/issues/93 has not be resolved yet, maybe I will open another PR to implement it. Thx for this contribution, and thx for using CodeSnap ❤️

Mr-LLLLL commented 1 month ago

Hi @Mr-LLLLL, thx for this contribution. Yes, allowing users to pass a function to dynamically calculate what watermark should display is a really useful feature.

However, the design of the watermark allows users to add custom symbols or something on their screenshots, thus it will make screenshots more personalized. I will merge this PR but the feature request mentioned on #93 has not be resolved yet, maybe I will open another PR to implement it. Thx for this contribution, and thx for using CodeSnap ❤️

I think your talking is right. watermark is not good way to show workspace but keep this feature is good idea 'custom watermark by lua function'

mistricky commented 1 month ago

Wait, I just realized your watermark function is called without any arguments, it's unnecessary to change the static value to function way, because the setup function itself is a computational environment:

setup({
  ..
  watermark: "foo" + "bar" + "any value"
})
mistricky commented 1 month ago

I will close this PR, because the function invoke way is unnecessary, thx for your contribution

Mr-LLLLL commented 1 month ago

:)