aboutsummaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua/plugins.lua
diff options
context:
space:
mode:
authordavidpkj <davidpenkow1@gmail.com>2022-12-03 22:26:26 +0100
committerdavidpkj <davidpenkow1@gmail.com>2022-12-03 22:26:26 +0100
commit5d4a749b7c51649bcd3953cd1686856408d08121 (patch)
treed0ddab7d5ee206e9b4403d4f177d942ec1608aa0 /neovim/.config/nvim/lua/plugins.lua
parent4f7ccffecdfa36c5e531654b8eec44199935d497 (diff)
Merge in dotfiles
Diffstat (limited to 'neovim/.config/nvim/lua/plugins.lua')
-rw-r--r--neovim/.config/nvim/lua/plugins.lua149
1 files changed, 149 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins.lua b/neovim/.config/nvim/lua/plugins.lua
new file mode 100644
index 0000000..5b28fbb
--- /dev/null
+++ b/neovim/.config/nvim/lua/plugins.lua
@@ -0,0 +1,149 @@
+-- Automatically run :PackerCompile whenever plugins.lua is updated with an autocommand:
+vim.api.nvim_create_autocmd("BufWritePost", {
+ group = vim.api.nvim_create_augroup("PACKER", { clear = true }),
+ pattern = "plugins.lua",
+ command = "source <afile> | PackerCompile",
+})
+
+return require("packer").startup(function(use)
+ use("wbthomason/packer.nvim")
+ use("nvim-lua/plenary.nvim")
+
+ -- Color theme
+ use({
+ "catppuccin/nvim",
+ as = "catppuccin-theme",
+ run = ":CatppuccinCompile",
+ config = function() require("plugins.catppuccin") end,
+ })
+
+ --[[ use({
+ "projekt0n/github-nvim-theme",
+ config = function() require("plugins.github-theme") end,
+ }) ]]
+
+ -- Status line
+ use({
+ {
+ "nvim-lualine/lualine.nvim",
+ event = "BufEnter",
+ config = function() require("plugins.lualine") end,
+ },
+ {
+ "j-hui/fidget.nvim",
+ after = "lualine.nvim",
+ config = function() require("plugins.fidget") end,
+ },
+ })
+
+ -- Better syntax highlighting
+ use({
+ {
+ "nvim-treesitter/nvim-treesitter",
+ event = "BufEnter",
+ config = function() require("plugins.treesitter") end,
+ },
+ {
+ "nvim-treesitter/playground",
+ after = "nvim-treesitter"
+ },
+ {
+ "nvim-treesitter/nvim-treesitter-refactor",
+ after = "nvim-treesitter"
+ },
+ {
+ "nvim-treesitter/nvim-treesitter-textobjects",
+ after = "nvim-treesitter"
+ },
+ })
+
+ -- Git features
+ use({
+ "lewis6991/gitsigns.nvim",
+ event = "BufEnter",
+ config = function() require("plugins.gitsigns") end,
+ })
+
+ -- Automatic bracket pars
+ use({
+ "windwp/nvim-autopairs",
+ event = "InsertCharPre",
+ after = "nvim-cmp",
+ config = function() require("plugins.pairs") end,
+ })
+
+ -- Comment utility
+ use({
+ "numToStr/Comment.nvim",
+ event = "BufEnter",
+ config = function() require("Comment").setup() end,
+ })
+
+ -- Fuzzy file picker
+ use({
+ {
+ "nvim-telescope/telescope.nvim",
+ config = function() require("plugins.telescope") end,
+ },
+ {
+ "nvim-telescope/telescope-fzf-native.nvim",
+ run = "make",
+ after = "telescope.nvim",
+ config = function() require("telescope").load_extension("fzf") end,
+ },
+ })
+
+ -- Language Server Protocol
+ use({
+ {
+ "neovim/nvim-lspconfig",
+ -- event = "BufEnter",
+ config = function() require("plugins.lsp") end,
+ },
+ {
+ "williamboman/mason-lspconfig.nvim",
+ after = "nvim-lspconfig",
+ },
+ {
+ "williamboman/mason.nvim",
+ after = "mason-lspconfig.nvim",
+ config = function() require("plugins.mason") end,
+ },
+ })
+
+ -- Completion framework
+ use({
+ {
+ "hrsh7th/nvim-cmp",
+ -- after = "nvim-lspconfig",
+ -- event = "BufEnter",
+ config = function() require("plugins.cmp") end,
+ },
+ {
+ "hrsh7th/cmp-nvim-lsp",
+ after = "nvim-cmp",
+ },
+ {
+ "hrsh7th/cmp-vsnip",
+ after = "nvim-cmp",
+ },
+ {
+ "hrsh7th/cmp-path",
+ after = "nvim-cmp",
+ },
+ {
+ "hrsh7th/cmp-buffer",
+ after = "nvim-cmp",
+ },
+ {
+ "hrsh7th/vim-vsnip",
+ after = "nvim-cmp",
+ },
+ })
+
+ use({
+ "simrat39/rust-tools.nvim",
+ after = "nvim-cmp",
+ config = function() require("plugins.rust-tools") end,
+ })
+end)