[Update] usage of save_path

pull/77/head
The Mist 2024-04-06 00:16:01 +08:00 committed by GitHub
parent 42437163db
commit 5389a958a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -109,14 +109,19 @@ If you using CodeSnap.nvim on wl-clipboard, you can refer [wl-clip-persist](http
Of course, you can use `CodeSnapSave` command to save the snapshot to path where you defined it in `config.save_path`
```lua
require("codesnap").setup({
-- ...
-- The save_path must be ends with .png, unless when you specified a directory path,
-- CodeSnap will append an auto-generated filename to the specified directory path
-- For example:
-- save_path = "~/Pictures"
-- parsed: "~/Pictures/CodeSnap_y-m-d_at_h:m:s.png"
-- save_path = "~/Pictures/foo.png"
-- parsed: "~/Pictures/foo.png"
save_path = ...
})
```
https://github.com/mistricky/codesnap.nvim/assets/22574136/69b27e77-3dce-4bc3-8516-89ce636fe02d
### Specify language extension
In some scenarios, CodeSnap.nvim cannot auto-detect what language syntax should used to highlight code, for example, shell script can have no extension, they specify interpreters using shebang.