This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.config/nvim/lua/plugin/packer.lua

126 lines
3.5 KiB
Lua
Raw Normal View History

-- Author : swytch
-- Created : Friday Mar 12, 2021 22:28:34 CET
-- License : GPLv3
-- Description : neovim packer config file
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
print("Cloning packer...")
PACKER_BOOTSTRAP = vim.fn.system({
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
})
vim.cmd([[packadd packer.nvim]])
print("Done.")
end
local packer = require("packer")
packer.init({
display = {
working_sym = '', -- The symbol for a plugin being installed/updated
error_sym = '', -- The symbol for a plugin with an error in installation/updating
done_sym = '', -- The symbol for a plugin which has completed installation/updating
removed_sym = '- ', -- The symbol for an unused plugin which was removed
moved_sym = '', -- The symbol for a plugin which was moved (e.g. from opt to start)
header_sym = '', -- The symbol for the header line in packer's display
open_fn = function()
return require('packer.util').float({ border = "single" })
end, -- Display in a floating window
},
})
local use = packer.use
return require("packer").startup(function()
-- packer manages itself
use "wbthomason/packer.nvim"
-- colorscheme
use {
"~/.local/src/astronomy.nvim",
config = function() require("colorscheme") end
}
-- tree-sitter
use {
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate",
config = function() require("plugin.treesitter") end
}
use { -- Additional text objects via treesitter
'nvim-treesitter/nvim-treesitter-textobjects',
after = 'nvim-treesitter',
}
-- telescope
use {
"nvim-telescope/telescope.nvim",
requires = {
{
"nvim-lua/plenary.nvim",
},
{
"nvim-telescope/telescope-fzf-native.nvim",
run = "make"
},
{
"nvim-telescope/telescope-file-browser.nvim",
}
},
config = function()
require("telescope")
require("telescope").load_extension("fzf")
require("telescope").load_extension("file_browser")
end
}
-- LSP
use {
"neovim/nvim-lspconfig",
requires = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
config = function() require("plugin.lsp") end
}
-- auto completion
use {
"hrsh7th/nvim-cmp",
requires = {
{
"L3MON4D3/LuaSnip",
config = function()
require("plugin.luasnip") end
},
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-calc",
"ray-x/cmp-treesitter",
"f3fora/cmp-spell",
},
config = function() require("plugin.cmp") end
}
2021-05-19 00:53:42 +02:00
-- commenting, simplified
use {
"numToStr/Comment.nvim",
config = function() require("plugin.comment") end
}
2021-10-12 19:10:20 +02:00
-- automatically setup the config after cloning
if PACKER_BOOTSTRAP then
require("packer").sync()
end
end)