Add auto-session plugin for neovim & improve startup time

This commit is contained in:
Mikkel Svartveit 2023-03-13 11:09:09 +01:00
parent e470180801
commit 10ea62b6df

View file

@ -130,9 +130,12 @@ Plug 'tpope/vim-surround'
" Github Copilot " Github Copilot
Plug 'github/copilot.vim' Plug 'github/copilot.vim'
" Auto-restore session when opening Neovim
Plug 'rmagatti/auto-session'
" File explorer sidebar " File explorer sidebar
Plug 'kyazdani42/nvim-web-devicons' Plug 'kyazdani42/nvim-web-devicons'
Plug 'kyazdani42/nvim-tree.lua' Plug 'kyazdani42/nvim-tree.lua', { 'commit': 'e14989c' }
" Fuzzy finder for files, buffers, etc. (including dependencies) " Fuzzy finder for files, buffers, etc. (including dependencies)
Plug 'nvim-lua/plenary.nvim' Plug 'nvim-lua/plenary.nvim'
@ -202,9 +205,14 @@ lua require('leap').add_default_mappings()
lua require('Comment').setup() lua require('Comment').setup()
" Disable Github Copilot on launch and configure commands " Disable Github Copilot on launch and configure commands
autocmd VimEnter * Copilot disable autocmd BufRead * let b:copilot_enabled = v:false
command! -nargs=0 CPE :Copilot enable command! -nargs=0 CPE :let b:copilot_enabled = v:true
command! -nargs=0 CPD :Copilot disable command! -nargs=0 CPD :let b:copilot_enabled = v:false
" Configure auto-session
lua require("auto-session").setup{
\ log_level = "error",
\ }
" Configure nvim-tree " Configure nvim-tree
let g:loaded_netrw = 1 let g:loaded_netrw = 1