126 lines
3.5 KiB
Lua
126 lines
3.5 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() -- true if packer was just installed
|
|
|
|
-- vim.cmd [[packadd packer.nvim]]
|
|
|
|
-- import packer safely
|
|
local status, packer = pcall(require, "packer")
|
|
if not status then
|
|
return
|
|
end
|
|
|
|
return packer.startup(function(use)
|
|
--Packer
|
|
use 'wbthomason/packer.nvim'
|
|
--Themes
|
|
use({
|
|
"catppuccin/nvim",
|
|
as = "catppuccin",
|
|
config = function()
|
|
vim.cmd [[colorscheme catppuccin-mocha]]
|
|
end
|
|
})
|
|
-- telescope
|
|
use {
|
|
'nvim-telescope/telescope.nvim', tag = '0.1.1',
|
|
requires = { { 'nvim-lua/plenary.nvim' } }
|
|
}
|
|
use {
|
|
"nvim-telescope/telescope-file-browser.nvim",
|
|
requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
|
}
|
|
use {
|
|
"nvim-telescope/telescope-project.nvim",
|
|
requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
|
}
|
|
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
|
-- development
|
|
use 'github/copilot.vim'
|
|
use {
|
|
'nvim-tree/nvim-tree.lua',
|
|
requires = { { 'nvim-tree/nvim-web-devicons' } }
|
|
}
|
|
use {
|
|
'nvim-treesitter/nvim-treesitter',
|
|
run = ':TSUpdate'
|
|
}
|
|
--lsp
|
|
use {
|
|
'williamboman/mason.nvim',
|
|
run = function()
|
|
pcall(vim.cmd, 'MasonUpdate')
|
|
end,
|
|
}
|
|
use{ 'neovim/nvim-lspconfig' }
|
|
use{ 'williamboman/mason-lspconfig.nvim' }
|
|
-- formatters and linters
|
|
use("jose-elias-alvarez/null-ls.nvim")
|
|
use("jayp0521/mason-null-ls.nvim")
|
|
-- completion
|
|
use{ 'hrsh7th/nvim-cmp' }
|
|
use{ 'hrsh7th/cmp-nvim-lsp' }
|
|
use("hrsh7th/cmp-buffer")
|
|
use("hrsh7th/cmp-path")
|
|
-- snippets
|
|
use("L3MON4D3/LuaSnip")
|
|
use("saadparwaiz1/cmp_luasnip")
|
|
use("rafamadriz/friendly-snippets")
|
|
use("onsails/lspkind.nvim")
|
|
use {
|
|
"folke/trouble.nvim",
|
|
requires = { "nvim-tree/nvim-web-devicons" },
|
|
}
|
|
use({
|
|
"iamcco/markdown-preview.nvim",
|
|
run = function() vim.fn["mkdp#util#install"]() end,
|
|
})
|
|
use {
|
|
'numToStr/Comment.nvim',
|
|
config = function()
|
|
end
|
|
}
|
|
use { 'TimUntersberger/neogit', requires = 'nvim-lua/plenary.nvim',}
|
|
use 'sindrets/diffview.nvim'
|
|
use("windwp/nvim-autopairs")
|
|
use({ "windwp/nvim-ts-autotag", after = "nvim-treesitter" })
|
|
use('lewis6991/gitsigns.nvim')
|
|
-- useful plugins
|
|
use {
|
|
"folke/which-key.nvim",
|
|
config = function()
|
|
vim.o.timeout = true
|
|
vim.o.timeoutlen = 300
|
|
require("which-key").setup {}
|
|
end
|
|
}
|
|
use {
|
|
'nvim-lualine/lualine.nvim',
|
|
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
|
|
}
|
|
use 'rcarriga/nvim-notify'
|
|
use { 'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons' }
|
|
use 'andweeb/presence.nvim'
|
|
use({
|
|
"kylechui/nvim-surround",
|
|
tag = "*",
|
|
config = function()
|
|
require("nvim-surround").setup({
|
|
})
|
|
end
|
|
})
|
|
use 'ObserverOfTime/nvimcord'
|
|
-- packer autosync
|
|
if packer_bootstrap then
|
|
require("packer").sync()
|
|
end
|
|
end)
|