123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- local core_plugins = {
- -- Packer can manage itself as an optional plugin
- { "wbthomason/packer.nvim" },
- { "neovim/nvim-lspconfig" },
- { "tamago324/nlsp-settings.nvim" },
- {
- "jose-elias-alvarez/null-ls.nvim",
- },
- { "antoinemadec/FixCursorHold.nvim" }, -- Needed while issue https://github.com/neovim/neovim/issues/12587 is still open
- { "williamboman/mason-lspconfig.nvim" },
- {
- "williamboman/mason.nvim",
- config = function()
- require("lvim.core.mason").setup()
- end,
- },
- {
- "lunarvim/onedarker.nvim",
- branch = "freeze",
- config = function()
- pcall(function()
- if lvim and lvim.colorscheme == "onedarker" then
- require("onedarker").setup()
- lvim.builtin.lualine.options.theme = "onedarker"
- end
- end)
- end,
- disable = lvim.colorscheme ~= "onedarker",
- },
- {
- "rcarriga/nvim-notify",
- config = function()
- require("lvim.core.notify").setup()
- end,
- requires = { "nvim-telescope/telescope.nvim" },
- disable = not lvim.builtin.notify.active or not lvim.builtin.telescope.active,
- },
- { "Tastyep/structlog.nvim" },
- { "nvim-lua/popup.nvim" },
- { "nvim-lua/plenary.nvim" },
- -- Telescope
- {
- "nvim-telescope/telescope.nvim",
- branch = "0.1.x",
- config = function()
- require("lvim.core.telescope").setup()
- end,
- disable = not lvim.builtin.telescope.active,
- },
- {
- "nvim-telescope/telescope-fzf-native.nvim",
- requires = { "nvim-telescope/telescope.nvim" },
- run = "make",
- disable = not lvim.builtin.telescope.active,
- },
- -- Install nvim-cmp, and buffer source as a dependency
- {
- "hrsh7th/nvim-cmp",
- config = function()
- if lvim.builtin.cmp then
- require("lvim.core.cmp").setup()
- end
- end,
- requires = {
- "L3MON4D3/LuaSnip",
- },
- },
- {
- "rafamadriz/friendly-snippets",
- disable = not lvim.builtin.luasnip.sources.friendly_snippets,
- },
- {
- "L3MON4D3/LuaSnip",
- config = function()
- local utils = require "lvim.utils"
- local paths = {}
- if lvim.builtin.luasnip.sources.friendly_snippets then
- paths[#paths + 1] = utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets")
- end
- local user_snippets = utils.join_paths(get_config_dir(), "snippets")
- if utils.is_directory(user_snippets) then
- paths[#paths + 1] = user_snippets
- end
- require("luasnip.loaders.from_lua").lazy_load()
- require("luasnip.loaders.from_vscode").lazy_load {
- paths = paths,
- }
- require("luasnip.loaders.from_snipmate").lazy_load()
- end,
- },
- {
- "hrsh7th/cmp-nvim-lsp",
- },
- {
- "saadparwaiz1/cmp_luasnip",
- },
- {
- "hrsh7th/cmp-buffer",
- },
- {
- "hrsh7th/cmp-path",
- },
- {
- "folke/lua-dev.nvim",
- module = "lua-dev",
- },
- -- Autopairs
- {
- "windwp/nvim-autopairs",
- -- event = "InsertEnter",
- config = function()
- require("lvim.core.autopairs").setup()
- end,
- disable = not lvim.builtin.autopairs.active,
- },
- -- Treesitter
- {
- "nvim-treesitter/nvim-treesitter",
- -- run = ":TSUpdate",
- config = function()
- require("lvim.core.treesitter").setup()
- end,
- },
- {
- "JoosepAlviste/nvim-ts-context-commentstring",
- event = "BufReadPost",
- },
- -- NvimTree
- {
- "kyazdani42/nvim-tree.lua",
- -- event = "BufWinOpen",
- -- cmd = "NvimTreeToggle",
- config = function()
- require("lvim.core.nvimtree").setup()
- end,
- disable = not lvim.builtin.nvimtree.active,
- },
- {
- "lewis6991/gitsigns.nvim",
- config = function()
- require("lvim.core.gitsigns").setup()
- end,
- event = "BufRead",
- disable = not lvim.builtin.gitsigns.active,
- },
- -- Whichkey
- {
- "folke/which-key.nvim",
- config = function()
- require("lvim.core.which-key").setup()
- end,
- event = "BufWinEnter",
- disable = not lvim.builtin.which_key.active,
- },
- -- Comments
- {
- "numToStr/Comment.nvim",
- event = "BufRead",
- config = function()
- require("lvim.core.comment").setup()
- end,
- disable = not lvim.builtin.comment.active,
- },
- -- project.nvim
- {
- "ahmedkhalf/project.nvim",
- config = function()
- require("lvim.core.project").setup()
- end,
- disable = not lvim.builtin.project.active,
- },
- -- Icons
- {
- "kyazdani42/nvim-web-devicons",
- disable = not lvim.use_icons,
- },
- -- Status Line and Bufferline
- {
- -- "hoob3rt/lualine.nvim",
- "nvim-lualine/lualine.nvim",
- -- "Lunarvim/lualine.nvim",
- config = function()
- require("lvim.core.lualine").setup()
- end,
- disable = not lvim.builtin.lualine.active,
- },
- {
- "akinsho/bufferline.nvim",
- config = function()
- require("lvim.core.bufferline").setup()
- end,
- branch = "main",
- event = "BufWinEnter",
- disable = not lvim.builtin.bufferline.active,
- },
- -- Debugging
- {
- "mfussenegger/nvim-dap",
- -- event = "BufWinEnter",
- config = function()
- require("lvim.core.dap").setup()
- end,
- disable = not lvim.builtin.dap.active,
- },
- -- Debugger management
- {
- "Pocco81/dap-buddy.nvim",
- branch = "dev",
- -- event = "BufWinEnter",
- -- event = "BufRead",
- disable = not lvim.builtin.dap.active,
- },
- -- alpha
- {
- "goolord/alpha-nvim",
- config = function()
- require("lvim.core.alpha").setup()
- end,
- disable = not lvim.builtin.alpha.active,
- },
- -- Terminal
- {
- "akinsho/toggleterm.nvim",
- event = "BufWinEnter",
- branch = "main",
- config = function()
- require("lvim.core.terminal").setup()
- end,
- disable = not lvim.builtin.terminal.active,
- },
- -- SchemaStore
- {
- "b0o/schemastore.nvim",
- },
- }
- local default_snapshot_path = join_paths(get_lvim_base_dir(), "snapshots", "default.json")
- local content = vim.fn.readfile(default_snapshot_path)
- local default_sha1 = vim.fn.json_decode(content)
- local get_default_sha1 = function(spec)
- local short_name, _ = require("packer.util").get_plugin_short_name(spec)
- return default_sha1[short_name] and default_sha1[short_name].commit
- end
- for _, spec in ipairs(core_plugins) do
- if not vim.env.LVIM_DEV_MODE then
- -- Manually lock the commit hash since Packer's snapshots are unreliable in headless mode
- spec["commit"] = get_default_sha1(spec)
- end
- end
- return core_plugins
|