From d1de1fa15e4c3bce1e7f83a4374d123dcb6af25c Mon Sep 17 00:00:00 2001 From: TheK4n Date: Tue, 28 Jun 2022 13:05:46 +0300 Subject: [PATCH] add vim plugin --- sub/vim/vimrc | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/sub/vim/vimrc b/sub/vim/vimrc index 1bb34d7..857834f 100644 --- a/sub/vim/vimrc +++ b/sub/vim/vimrc @@ -104,6 +104,7 @@ call vundle#begin() Plugin 'francoiscabrol/ranger.vim' Plugin 'rbgrouleff/bclose.vim' Plugin 'frazrepo/vim-rainbow' + Plugin 'Pocco81/AutoSave.nvim' " requiered patch your font Plugin 'ryanoasis/vim-devicons' Plugin 'jiangmiao/auto-pairs' @@ -175,11 +176,35 @@ let g:multi_cursor_quit_key = '' +lua << EOF + +local autosave = require("autosave") + +autosave.setup( + { + enabled = true, + execution_message = "AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"), + events = {"TextChanged", "InsertLeave"}, + conditions = { + exists = true, + filename_is_not = {}, + filetype_is_not = {}, + modifiable = true + }, + write_all_buffers = false, + on_off_commands = true, + clean_command_line_interval = 0, + debounce_delay = 1000 + } +) + +EOF + + + " BEGIN pyright - - lua << EOF -- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' @@ -288,7 +313,6 @@ for _, lsp in ipairs(servers) do end EOF - " END pyright