|
1 | 1 | <p align="center"> |
2 | | - <h2 align="center">🧶 auto-save.nvim</h2> |
| 2 | + <h2 align="center">🧶 auto-save.nvim</h2> |
3 | 3 | </p> |
4 | 4 |
|
5 | 5 | <p align="center"> |
@@ -38,7 +38,7 @@ This plugin has been renamed from `AutoSave` to `auto-save`, and this repository |
38 | 38 |
|
39 | 39 | ### 📚 Requirements |
40 | 40 |
|
41 | | -- Neovim >= 0.5.0 |
| 41 | +- Neovim >= 0.5.0 |
42 | 42 |
|
43 | 43 | |
44 | 44 |
|
|
86 | 86 |
|
87 | 87 | ```lua |
88 | 88 | { |
89 | | - enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it) |
90 | | - execution_message = { |
| 89 | + enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it) |
| 90 | + execution_message = { |
| 91 | + enabled = true, |
91 | 92 | message = function() -- message to print on save |
92 | 93 | return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S")) |
93 | 94 | end, |
94 | 95 | dim = 0.18, -- dim the color of `message` |
95 | 96 | cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea |
96 | 97 | }, |
97 | | - trigger_events = {"InsertLeave", "TextChanged"}, -- vim events that trigger auto-save. See :h events |
| 98 | + trigger_events = {"InsertLeave", "TextChanged"}, -- vim events that trigger auto-save. See :h events |
98 | 99 | -- function that determines whether to save the current buffer or not |
99 | 100 | -- return true: if buffer is ok to be saved |
100 | 101 | -- return false: if it's not ok to be saved |
|
109 | 110 | end |
110 | 111 | return false -- can't save |
111 | 112 | end, |
112 | | - write_all_buffers = false, -- write all buffers when the current one meets `condition` |
113 | | - debounce_delay = 135, -- saves the file at most every `debounce_delay` milliseconds |
| 113 | + write_all_buffers = false, -- write all buffers when the current one meets `condition` |
| 114 | + debounce_delay = 135, -- saves the file at most every `debounce_delay` milliseconds |
114 | 115 | callbacks = { -- functions to be executed at different intervals |
115 | 116 | enabling = nil, -- ran when enabling auto-save |
116 | 117 | disabling = nil, -- ran when disabling auto-save |
|
0 commit comments