2021-05-19 00:53:42 +02:00
|
|
|
-- Author : swytch
|
|
|
|
-- Created : Friday Mar 12, 2021 22:28:34 CET
|
|
|
|
-- License : GPLv3
|
2022-05-04 22:59:13 +02:00
|
|
|
-- Description : neovim packer config file
|
2021-05-19 00:53:42 +02:00
|
|
|
|
|
|
|
|
2022-04-27 20:05:27 +02:00
|
|
|
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
|
|
|
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
2022-04-27 21:58:12 +02:00
|
|
|
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.")
|
2021-05-19 00:53:42 +02:00
|
|
|
end
|
|
|
|
|
2022-11-10 20:52:33 +01:00
|
|
|
local packer = require("packer")
|
|
|
|
|
2022-05-04 22:59:13 +02:00
|
|
|
packer.init({
|
|
|
|
display = {
|
2022-11-10 20:42:38 +01:00
|
|
|
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
|
2022-12-26 18:45:40 +01:00
|
|
|
open_fn = function()
|
|
|
|
return require('packer.util').float({ border = "single" })
|
|
|
|
end, -- Display in a floating window
|
2022-05-04 22:59:13 +02:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
local use = packer.use
|
2022-04-27 20:06:24 +02:00
|
|
|
|
2021-05-19 00:53:42 +02:00
|
|
|
return require("packer").startup(function()
|
2022-04-27 21:58:12 +02:00
|
|
|
-- packer manages itself
|
|
|
|
use "wbthomason/packer.nvim"
|
2021-05-19 00:53:42 +02:00
|
|
|
|
2022-04-27 21:58:12 +02:00
|
|
|
-- colorscheme
|
|
|
|
use {
|
|
|
|
"~/.local/src/astronomy.nvim",
|
|
|
|
config = function() require("colorscheme") end
|
|
|
|
}
|
2021-05-19 00:53:42 +02:00
|
|
|
|
2022-04-27 21:58:12 +02:00
|
|
|
-- tree-sitter
|
|
|
|
use {
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
run = ":TSUpdate",
|
|
|
|
config = function() require("plugin.treesitter") end
|
|
|
|
}
|
2021-05-19 00:53:42 +02:00
|
|
|
|
2022-12-26 18:49:45 +01:00
|
|
|
-- telescope
|
2022-04-27 21:58:12 +02:00
|
|
|
use {
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
requires = {
|
|
|
|
{
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"nvim-telescope/telescope-fzf-native.nvim",
|
|
|
|
run = "make"
|
2022-12-26 18:50:57 +01:00
|
|
|
},
|
2022-04-27 21:58:12 +02:00
|
|
|
},
|
2022-12-26 18:50:57 +01:00
|
|
|
config = function()
|
|
|
|
require("telescope").load_extension("fzf")
|
|
|
|
end
|
2022-04-27 21:58:12 +02:00
|
|
|
}
|
2021-05-19 00:53:42 +02:00
|
|
|
|
2022-04-27 21:58:12 +02:00
|
|
|
-- LSP
|
|
|
|
use {
|
2022-05-02 23:35:31 +02:00
|
|
|
"neovim/nvim-lspconfig",
|
2022-04-27 21:58:12 +02:00
|
|
|
requires = {
|
2022-11-10 20:53:58 +01:00
|
|
|
"williamboman/mason.nvim",
|
|
|
|
"williamboman/mason-lspconfig.nvim",
|
2022-04-27 21:58:12 +02:00
|
|
|
},
|
2022-05-02 23:35:31 +02:00
|
|
|
config = function() require("plugin.lsp") end
|
2022-04-27 21:58:12 +02:00
|
|
|
}
|
2021-05-19 00:53:42 +02:00
|
|
|
|
2022-04-27 21:58:12 +02:00
|
|
|
-- 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
|
|
|
|
2022-04-27 21:58:12 +02:00
|
|
|
-- commenting, simplified
|
|
|
|
use {
|
|
|
|
"numToStr/Comment.nvim",
|
|
|
|
config = function() require("plugin.comment") end
|
|
|
|
}
|
2021-10-12 19:10:20 +02:00
|
|
|
|
2022-04-27 21:58:12 +02:00
|
|
|
-- autopairs
|
|
|
|
use {
|
|
|
|
"windwp/nvim-autopairs",
|
|
|
|
config = function() require("nvim-autopairs").setup() end
|
|
|
|
}
|
2022-04-27 20:05:27 +02:00
|
|
|
|
|
|
|
|
2022-04-27 21:58:12 +02:00
|
|
|
-- automatically setup the config after cloning
|
|
|
|
if PACKER_BOOTSTRAP then
|
|
|
|
require("packer").sync()
|
|
|
|
end
|
2021-05-19 00:53:42 +02:00
|
|
|
end)
|