105 lines
2.5 KiB
Lua
105 lines
2.5 KiB
Lua
-- Author : swytch
|
|
-- Created : Friday Mar 12, 2021 22:28:34 CET
|
|
-- License : GPLv3
|
|
-- Description : neovim plugins 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 use = require("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
|
|
}
|
|
|
|
-- fuzzy finder
|
|
use {
|
|
"nvim-telescope/telescope.nvim",
|
|
requires = {
|
|
{
|
|
"nvim-lua/plenary.nvim",
|
|
},
|
|
{
|
|
"nvim-telescope/telescope-fzf-native.nvim",
|
|
run = "make"
|
|
}
|
|
},
|
|
}
|
|
|
|
-- LSP
|
|
use {
|
|
"williamboman/nvim-lsp-installer",
|
|
requires = {
|
|
"neovim/nvim-lspconfig",
|
|
config = function()
|
|
require("plugin.lsp_config").setup() end
|
|
},
|
|
config = function() require("plugin.lsp_installer") 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
|
|
}
|
|
|
|
-- commenting, simplified
|
|
use {
|
|
"numToStr/Comment.nvim",
|
|
config = function() require("plugin.comment") end
|
|
}
|
|
|
|
-- autopairs
|
|
use {
|
|
"windwp/nvim-autopairs",
|
|
config = function() require("nvim-autopairs").setup() end
|
|
}
|
|
|
|
|
|
-- automatically setup the config after cloning
|
|
if PACKER_BOOTSTRAP then
|
|
require("packer").sync()
|
|
end
|
|
end)
|