From 890bd09c4998d56cade6872a51c3e580f4312290 Mon Sep 17 00:00:00 2001 From: veypi Date: Fri, 22 Apr 2022 18:25:01 +0800 Subject: [PATCH] update --- lua/plugins.lua | 5 ++++- lua/utils/setup.lua | 7 ++++--- maps.vim | 9 +++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lua/plugins.lua b/lua/plugins.lua index 575252e..b3753d4 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -44,7 +44,10 @@ return require('packer').startup(function() 'nvim-telescope/telescope.nvim', requires = { { 'nvim-lua/plenary.nvim' } } } - use { "akinsho/toggleterm.nvim" } + + use {"akinsho/toggleterm.nvim"} + + use "Pocco81/AutoSave.nvim" use 'lewis6991/gitsigns.nvim' diff --git a/lua/utils/setup.lua b/lua/utils/setup.lua index 9e11326..3bef53a 100644 --- a/lua/utils/setup.lua +++ b/lua/utils/setup.lua @@ -2,8 +2,9 @@ require('Comment').setup() require('nvim-autopairs').setup() + require("toggleterm").setup { - open_mapping = [[]], + open_mapping = [[]], hide_numbers = true, insert_mappings = true, -- whether or not the open mapping applies in insert mode terminal_mappings = true, @@ -13,7 +14,7 @@ require("toggleterm").setup { require("autosave").setup { enabled = true, execution_message = "AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"), - events = { "BufLeave", "FocusLost"}, + events = { "BufLeave", "FocusLost" }, conditions = { exists = true, filename_is_not = {}, @@ -26,6 +27,6 @@ require("autosave").setup { debounce_delay = 135 } -require('gitsigns').setup{ +require('gitsigns').setup { } diff --git a/maps.vim b/maps.vim index ef5bc02..d66ec17 100644 --- a/maps.vim +++ b/maps.vim @@ -69,5 +69,10 @@ nnoremap :NvimTreeToggle " telescope -nnoremap sf Telescope find_files -nnoremap sw Telescope live_grep +nnoremap sf Telescope find_files +nnoremap sw Telescope live_grep + +" 禁用f1 +" map +map :ToggleTerm +