aboutsummaryrefslogtreecommitdiff
path: root/lua/user/plugins.lua
diff options
context:
space:
mode:
authorAleksa Vučković <aleksav013@gmail.com>2022-01-05 15:35:38 +0100
committerAleksa Vučković <aleksav013@gmail.com>2022-01-05 15:35:38 +0100
commit6c1c6ba2f5b45c0c3ba178ee34a9992ce23b7180 (patch)
tree48fad4a844d874303149f829db4a062634b10f79 /lua/user/plugins.lua
parent2a5f4d72d21d495408a52a2cad271b1e5775967b (diff)
ccls working as intended
Diffstat (limited to 'lua/user/plugins.lua')
-rw-r--r--lua/user/plugins.lua59
1 files changed, 59 insertions, 0 deletions
diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua
new file mode 100644
index 0000000..d1e7c69
--- /dev/null
+++ b/lua/user/plugins.lua
@@ -0,0 +1,59 @@
+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
+ packer_bootstrap = fn.system({"git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path})
+ vim.cmd [[packadd packer.nvim]]
+end
+
+-- Autocommand that reloads neovim whenever you save the plugins.lua file
+vim.cmd([[
+ augroup packer_user_config
+ autocmd!
+ autocmd BufWritePost plugins.lua source <afile> | PackerSync
+ augroup end
+]])
+
+local status, packer = pcall(require, "packer")
+if not status then
+ return
+end
+
+packer.init {
+ display = {
+ open_fn = function()
+ return require("packer.util").float { border = "rounded" }
+ end,
+ },
+}
+
+return packer.startup(function(use)
+-- Packer
+ use "wbthomason/packer.nvim"
+
+-- cmp
+ use "hrsh7th/nvim-cmp"
+ use "saadparwaiz1/cmp_luasnip"
+ use "hrsh7th/cmp-nvim-lsp"
+ use "hrsh7th/cmp-buffer"
+ use "hrsh7th/cmp-path"
+ use "hrsh7th/cmp-cmdline"
+ use "hrsh7th/cmp-nvim-lua"
+
+-- snippets
+ use "L3MON4D3/LuaSnip"
+
+-- LSP
+ use "neovim/nvim-lspconfig"
+ use "williamboman/nvim-lsp-installer"
+
+-- Other
+ use "kyazdani42/nvim-web-devicons"
+ use "kyazdani42/nvim-tree.lua"
+ use "akinsho/bufferline.nvim"
+
+ -- 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)