autosave jsonlsp
This commit is contained in:
parent
757f612ce2
commit
104145392c
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"LazyVim": { "branch": "main", "commit": "13a4a84e3485a36e64055365665a45dc82b6bf71" },
|
"LazyVim": { "branch": "main", "commit": "13a4a84e3485a36e64055365665a45dc82b6bf71" },
|
||||||
|
"auto-save.nvim": { "branch": "main", "commit": "5fbcaac0a2698c87a9a1bd2083cb6949505cca12" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
|
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
|
||||||
"catppuccin": { "branch": "main", "commit": "7be452ee067978cdc8b2c5f3411f0c71ffa612b9" },
|
"catppuccin": { "branch": "main", "commit": "7be452ee067978cdc8b2c5f3411f0c71ffa612b9" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extras": [
|
"extras": [],
|
||||||
|
|
||||||
],
|
|
||||||
"news": {
|
"news": {
|
||||||
"NEWS.md": "6520"
|
"NEWS.md": "6520"
|
||||||
},
|
},
|
||||||
"version": 6
|
"version": 6
|
||||||
}
|
}
|
||||||
|
|||||||
27
lua/plugins/autosave.lua
Normal file
27
lua/plugins/autosave.lua
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"okuuva/auto-save.nvim",
|
||||||
|
version = '^1.0.0', -- see https://devhints.io/semver, alternatively use '*' to use the latest tagged release
|
||||||
|
cmd = "ASToggle", -- optional for lazy loading on command
|
||||||
|
event = { "InsertLeave", "TextChanged" }, -- optional for lazy loading on trigger events
|
||||||
|
opts = {
|
||||||
|
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
|
||||||
|
trigger_events = { -- See :h events
|
||||||
|
immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
|
||||||
|
defer_save = { "InsertLeave", "TextChanged" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
|
||||||
|
cancel_deferred_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
|
||||||
|
},
|
||||||
|
-- function that takes the buffer handle and determines whether to save the current buffer or not
|
||||||
|
-- return true: if buffer is ok to be saved
|
||||||
|
-- return false: if it's not ok to be saved
|
||||||
|
-- if set to `nil` then no specific condition is applied
|
||||||
|
condition = nil,
|
||||||
|
write_all_buffers = false, -- write all buffers when the current one meets `condition`
|
||||||
|
noautocmd = false, -- do not execute autocmds when saving
|
||||||
|
lockmarks = false, -- lock marks when saving, see `:h lockmarks` for more details
|
||||||
|
debounce_delay = 1000, -- delay after which a pending save is executed
|
||||||
|
-- log debug messages to 'auto-save.log' file in neovim cache directory, set to `true` to enable
|
||||||
|
debug = false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = { ensure_installed = { "vue", "css", "go", "gomod", "gowork", "gosum" } },
|
opts = { ensure_installed = { "vue", "css", "go", "gomod", "gowork", "gosum", "json5" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user