diff options
Diffstat (limited to 'lua/plugins/init.lua')
-rw-r--r-- | lua/plugins/init.lua | 78 |
1 files changed, 72 insertions, 6 deletions
diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 59da877..07d7639 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -10,24 +10,25 @@ require("lazy").setup({ { "nvim-lualine/lualine.nvim", - dependencies = { 'nvim-tree/nvim-web-devicons' }, opts = require "plugins.opts.lualine", }, { - "tiagovla/tokyodark.nvim", + "folke/tokyonight.nvim", lazy = false, + priority = 1000, - opts = { transparent_background = true }, + opts = { transparent = true, }, config = function(_, opts) - require("tokyodark").setup(opts) - vim.cmd.colorscheme "tokyodark" + require("tokyonight").setup(opts) + vim.cmd.colorscheme "tokyonight-night" end, }, { - "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", event = { "BufReadPost", "BufNewFile" }, cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, @@ -37,4 +38,69 @@ require("lazy").setup({ 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, + }, }) |