irongit

Configure synchronization of files and directories through a plugin.

fixed some typos

huncholanehuncholaneauthored
parent cd5b1f7commit 878ef30554d515e7d8644761a6ee2f76affd1b02Browse files

3 files changed, +29 -12

+28-4README.md
@@ -60,20 +60,44 @@ For inline type hints and autocomplete, annotate your `opts` using:
6060
6161 ```lua
6262 if false then
63- require("syncmap.lazy")
63+ require("syncmap.types")
64+ require("lazy.types")
6465 end
65----@type SyncmapLazySpec
66+---@type LazySpec
6667 return {
6768 "huncholane/syncmap.nvim",
69+ ---@type SyncmapOpts
6870 opts = {
6971 map = {
70- { vim.fn.expand("~/.dotfiles/test/"), vim.fn.expand("~/.config/test/") },
72+ { vim.fn.expand("~/.dotfiles/nvim/"), vim.fn.expand("~/.config/nvim/") },
73+ { vim.fn.expand("~/.dotfiles/tmux/"), vim.fn.expand("~/.config/tmux/") },
7174 },
72- log_level = "info",
7375 },
7476 }
7577 ```
7678
79+or ...
80+
81+```lua
82+if false then
83+ require("syncmap.types")
84+ require("lazy.types")
85+end
86+return {
87+ ---@type LazySpec
88+ {
89+ "huncholane/syncmap.nvim",
90+ ---@type SyncmapOpts
91+ opts = {
92+ map = {
93+ { vim.fn.expand("~/.dotfiles/nvim/"), vim.fn.expand("~/.config/nvim/") },
94+ { vim.fn.expand("~/.dotfiles/tmux/"), vim.fn.expand("~/.config/tmux/") },
95+ },
96+ },
97+ }
98+}
99+```
100+
77101 ![type-sample](./doc/type.png)
78102
79103 This gives you full visibility into available options and correct types.
+0-7lua/syncmap/lazy.lua
@@ -1,7 +0,0 @@
1-require("lazy.types")
2-
3----@class SyncMapOptsWrapper
4----@field opts? SyncmapOpts
5-
6----LazyVim Specs for syncmap
7----@alias SyncmapLazySpec LazySpec|SyncMapOptsWrapper
+1-1lua/syncmap/rsync.lua
@@ -12,7 +12,7 @@ function M.run(args)
1212 if vim.v.shell_error ~= 0 then
1313 log.error(table.concat(cmd, " ") .. " failed:\n" .. result)
1414 else
15- log.info(table.concat(cmd, " ") .. " succed")
15+ log.info(table.concat(cmd, " ") .. " succeeded")
1616 end
1717 return result
1818 end