61 lines
1.7 KiB
Lua
61 lines
1.7 KiB
Lua
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()
|
|
|
|
return require('packer').startup(function(use)
|
|
use 'wbthomason/packer.nvim'
|
|
use 'ellisonleao/gruvbox.nvim'
|
|
use 'nvim-tree/nvim-tree.lua'
|
|
use 'nvim-tree/nvim-web-devicons'
|
|
use 'nvim-lualine/lualine.nvim'
|
|
use 'nvim-treesitter/nvim-treesitter'
|
|
use { "bluz71/vim-moonfly-colors", as = "moonfly" }
|
|
use {
|
|
'nvim-telescope/telescope.nvim', tag = '0.1.8',
|
|
requires = { {'nvim-lua/plenary.nvim'} }
|
|
}
|
|
|
|
-- LSP
|
|
use { 'williamboman/mason.nvim' }
|
|
use { 'neovim/nvim-lspconfig' }
|
|
use { 'williamboman/mason-lspconfig.nvim' }
|
|
|
|
-- Completion
|
|
use { 'hrsh7th/nvim-cmp' }
|
|
use { 'hrsh7th/cmp-nvim-lsp' }
|
|
|
|
-- Flutter
|
|
use {
|
|
'akinsho/flutter-tools.nvim',
|
|
requires = {
|
|
'nvim-lua/plenary.nvim',
|
|
'stevearc/dressing.nvim', -- optional for vim.ui.select
|
|
},
|
|
}
|
|
|
|
-- Snippet
|
|
use({
|
|
"L3MON4D3/LuaSnip",
|
|
-- follow latest release.
|
|
tag = "v<CurrentMajor>.*",
|
|
-- install jsregexp (optional!:).
|
|
run = "make install_jsregexp"
|
|
})
|
|
use { 'saadparwaiz1/cmp_luasnip' }
|
|
use { 'rafamadriz/friendly-snippets' }
|
|
-- 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)
|