diff options
Diffstat (limited to 'neovim/.config/nvim/lua/plugins.lua')
-rw-r--r-- | neovim/.config/nvim/lua/plugins.lua | 149 |
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) |