Add config/nvim/lua/plugins.lua
This commit is contained in:
parent
31bd022bec
commit
c0f0f26be6
32
config/nvim/lua/plugins.lua
Normal file
32
config/nvim/lua/plugins.lua
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
local ensure_packer = function()
|
||||||
|
local fn = vim.fn
|
||||||
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
|
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local packer_bootstrap = ensure_packer()
|
||||||
|
|
||||||
|
vim.opt.clipboard = 'unnamed'
|
||||||
|
|
||||||
|
return require('packer').startup(function(use)
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
|
-- TreeSitter
|
||||||
|
use {'nvim-treesitter/nvim-treesitter',
|
||||||
|
run = function()
|
||||||
|
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
|
||||||
|
ts_update()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Automatically set up your configuration after cloning packer.nvim
|
||||||
|
-- Put this at the end after all plugins
|
||||||
|
if packer_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
|
end)
|
Loading…
Reference in New Issue
Block a user