user/neovim: add auto-save.nvim
This commit is contained in:
parent
5989fc4e70
commit
6fabeecd1d
2 changed files with 14 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ in {
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
autoclose-nvim
|
autoclose-nvim
|
||||||
|
auto-save-nvim
|
||||||
flutter-tools-nvim
|
flutter-tools-nvim
|
||||||
fzf-vim
|
fzf-vim
|
||||||
fzf-lsp-nvim
|
fzf-lsp-nvim
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,19 @@ vim.cmd("au FileType rust highlight DiagnosticUnderlineHint ctermfg=14 gui=itali
|
||||||
|
|
||||||
-- Plugins
|
-- Plugins
|
||||||
require('autoclose').setup {}
|
require('autoclose').setup {}
|
||||||
|
local function autosavecond(buf)
|
||||||
|
if vim.tbl_contains({"astro"}, vim.fn.getbufvar(buf, "&filetype")) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
require('auto-save').setup {
|
||||||
|
trigger_events = {
|
||||||
|
defer = { "InsertLeave", "TextChanged", "TextChangedI" },
|
||||||
|
},
|
||||||
|
debounce_delay = 250,
|
||||||
|
condition = autosavecond,
|
||||||
|
}
|
||||||
require('nvim-ts-autotag').setup {}
|
require('nvim-ts-autotag').setup {}
|
||||||
require('nvim-highlight-colors').setup {}
|
require('nvim-highlight-colors').setup {}
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue