@@ -59,7 +59,9 @@ map("n", "<Esc>", function()
5959 return " <Esc>"
6060end , { expr = true , desc = " Escape and clear search highlight" })
6161
62- map (" n" , " <Leader>lz" , " <Cmd>Lazy<CR>" , { desc = " Open lazy" })
62+ map (" n" , " <Leader>pu" , function ()
63+ vim .pack .update ()
64+ end , { desc = " Update plugins" })
6365
6466vim .api .nvim_create_autocmd (" TextYankPost" , {
6567 group = vim .api .nvim_create_augroup (" UserHighlight" , { clear = true }),
@@ -68,43 +70,32 @@ vim.api.nvim_create_autocmd("TextYankPost", {
6870 end ,
6971})
7072
71- local lazypath = vim .fn .stdpath (" data" ) .. " /lazy/lazy.nvim"
72- if not vim .uv .fs_stat (lazypath ) then
73- local lazyrepo = " https://github.com/folke/lazy.nvim.git"
74- vim .fn .system ({ " git" , " clone" , " --filter=blob:none" , " --branch=stable" , lazyrepo , lazypath })
75- end
76- vim .opt .rtp :prepend (lazypath )
77-
78- local plugins = {
79- { " saghen/blink.cmp" , version = " *" },
80- { " stevearc/conform.nvim" },
81- { " lewis6991/gitsigns.nvim" },
82- { " neovim/nvim-lspconfig" },
83- { " nvim-treesitter/nvim-treesitter" , build = " :TSUpdate" },
84- { " stevearc/oil.nvim" },
85- { " folke/snacks.nvim" , priority = 1000 },
86- }
87-
88- local lazy_opts = {
89- rocks = { enabled = false },
90- install = { colorscheme = { " flexoki" } },
91- ui = { border = " rounded" },
92- change_detection = { notify = false },
93- performance = {
94- rtp = {
95- disabled_plugins = {
96- " gzip" ,
97- " netrwPlugin" ,
98- " tarPlugin" ,
99- " tohtml" ,
100- " tutor" ,
101- " zipPlugin" ,
102- },
103- },
104- },
105- }
106-
107- require (" lazy" ).setup (plugins , lazy_opts )
73+ vim .g .loaded_gzip = 1
74+ vim .g .loaded_netrwPlugin = 1
75+ vim .g .loaded_tarPlugin = 1
76+ vim .g .loaded_tohtml = 1
77+ vim .g .loaded_tutor = 1
78+ vim .g .loaded_zipPlugin = 1
79+
80+ vim .api .nvim_create_autocmd (" PackChanged" , {
81+ desc = " Run :TSUpdate after nvim-treesitter install/update" ,
82+ callback = function (ev )
83+ local data = ev .data
84+ if data .spec .name == " nvim-treesitter" and (data .kind == " install" or data .kind == " update" ) then
85+ vim .cmd (" TSUpdate" )
86+ end
87+ end ,
88+ })
89+
90+ vim .pack .add ({
91+ { src = " https://github.com/folke/snacks.nvim" },
92+ { src = " https://github.com/saghen/blink.cmp" , version = vim .version .range (" *" ) },
93+ { src = " https://github.com/stevearc/conform.nvim" },
94+ { src = " https://github.com/lewis6991/gitsigns.nvim" },
95+ { src = " https://github.com/neovim/nvim-lspconfig" },
96+ { src = " https://github.com/nvim-treesitter/nvim-treesitter" },
97+ { src = " https://github.com/stevearc/oil.nvim" },
98+ })
10899
109100require (" config.snacks" )
110101require (" config.blink" )
0 commit comments