aboutsummaryrefslogblamecommitdiff
path: root/lua/plugins/init.lua
blob: e643c37e4ebc51861eb96bc4213c7923904056d7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                             
 
                                                       


          
                                        
                             
                                
 
                                              
                                          
                                                         
                                                               



                    

                                                  


                                                                                     
                                                          




                                                                      
         

                                            










                                                                            

                                      

                                
                                                   
















                                                                                        





                                                                                        












                                                           
                                                          
                    


          


                                                       

                                   
                                                         

                    
  
require("lazy").setup({
	"tpope/vim-fugitive",
	"tpope/vim-sleuth",
	{ "numToStr/Comment.nvim", opts = {} },

	{
		"lewis6991/gitsigns.nvim",
		opts = require("plugins.opts.misc").gitsigns,
	},

	{
		"nvim-lualine/lualine.nvim",

		opts = require("plugins.opts.lualine"),
	},

	{
		"folke/tokyonight.nvim",
		lazy = false,
		priority = 1000,

		opts = { transparent = true },
		config = function(_, opts)
			require("tokyonight").setup(opts)
			vim.cmd.colorscheme("tokyonight-night")
		end,
	},

	{
		"nvim-treesitter/nvim-treesitter",
		build = ":TSUpdate",
		event = { "BufReadPost", "BufNewFile" },
		cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },

		opts = require("plugins.opts.treesitter"),
		config = function(_, opts)
			require("nvim-treesitter.configs").setup(opts)
		end,
	},

	{
		"VonHeikemen/lsp-zero.nvim",
		branch = "v3.x",
		lazy = true,

		config = false,
		init = function()
			-- Disable automatic setup, we are doing it manually
			vim.g.lsp_zero_extend_cmp = 0
			vim.g.lsp_zero_extend_lspconfig = 0
		end,
	},

	{
		"hrsh7th/nvim-cmp",
		event = "InsertEnter",
		dependencies = {
			{
				"L3MON4D3/LuaSnip",
				dependencies = "rafamadriz/friendly-snippets",

				config = function(_, opts)
					require("plugins.opts.misc").luasnip(opts)
				end,
			},
			{
				"windwp/nvim-autopairs",

				opts = {
					fast_wrap = {},
					disable_filetype = { "TelescopePrompt", "vim" },
				},
				config = function(_, opts)
					require("nvim-autopairs").setup(opts)

					-- setup cmp for autopairs
					local cmp_autopairs =
						require("nvim-autopairs.completion.cmp")
					require("cmp").event:on(
						"confirm_done",
						cmp_autopairs.on_confirm_done()
					)
				end,
			},
			-- cmp sources plugins
			{
				"saadparwaiz1/cmp_luasnip",
				"hrsh7th/cmp-nvim-lua",
				"hrsh7th/cmp-nvim-lsp",
				"hrsh7th/cmp-buffer",
				"hrsh7th/cmp-path",
			},
		},

		opts = function()
			return require("plugins.opts.cmp")
		end,
	},

	{
		"neovim/nvim-lspconfig",
		cmd = "LspInfo",
		event = { "BufReadPre", "BufNewFile" },

		config = function()
			require("plugins.opts.lspconfig")
		end,
	},
})