plugins.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. local core_plugins = {
  2. -- Packer can manage itself as an optional plugin
  3. { "wbthomason/packer.nvim" },
  4. { "neovim/nvim-lspconfig" },
  5. { "tamago324/nlsp-settings.nvim" },
  6. {
  7. "jose-elias-alvarez/null-ls.nvim",
  8. },
  9. { "antoinemadec/FixCursorHold.nvim" }, -- Needed while issue https://github.com/neovim/neovim/issues/12587 is still open
  10. {
  11. "williamboman/nvim-lsp-installer",
  12. },
  13. {
  14. "lunarvim/onedarker.nvim",
  15. config = function()
  16. pcall(function()
  17. if lvim and lvim.colorscheme == "onedarker" then
  18. require("onedarker").setup()
  19. lvim.builtin.lualine.options.theme = "onedarker"
  20. end
  21. end)
  22. end,
  23. disable = lvim.colorscheme ~= "onedarker",
  24. },
  25. {
  26. "rcarriga/nvim-notify",
  27. config = function()
  28. require("lvim.core.notify").setup()
  29. end,
  30. requires = { "nvim-telescope/telescope.nvim" },
  31. disable = not lvim.builtin.notify.active or not lvim.builtin.telescope.active,
  32. },
  33. { "Tastyep/structlog.nvim" },
  34. { "nvim-lua/popup.nvim" },
  35. { "nvim-lua/plenary.nvim" },
  36. -- Telescope
  37. {
  38. "nvim-telescope/telescope.nvim",
  39. config = function()
  40. require("lvim.core.telescope").setup()
  41. end,
  42. disable = not lvim.builtin.telescope.active,
  43. },
  44. {
  45. "nvim-telescope/telescope-fzf-native.nvim",
  46. requires = { "nvim-telescope/telescope.nvim" },
  47. run = "make",
  48. disable = not lvim.builtin.telescope.active,
  49. },
  50. -- Install nvim-cmp, and buffer source as a dependency
  51. {
  52. "hrsh7th/nvim-cmp",
  53. config = function()
  54. if lvim.builtin.cmp then
  55. require("lvim.core.cmp").setup()
  56. end
  57. end,
  58. requires = {
  59. "L3MON4D3/LuaSnip",
  60. "rafamadriz/friendly-snippets",
  61. },
  62. },
  63. {
  64. "rafamadriz/friendly-snippets",
  65. },
  66. {
  67. "L3MON4D3/LuaSnip",
  68. config = function()
  69. local utils = require "lvim.utils"
  70. require("luasnip.loaders.from_lua").lazy_load()
  71. require("luasnip.loaders.from_vscode").lazy_load {
  72. paths = {
  73. utils.join_paths(get_config_dir(), "snippets"),
  74. utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets"),
  75. },
  76. }
  77. require("luasnip.loaders.from_snipmate").lazy_load()
  78. end,
  79. },
  80. {
  81. "hrsh7th/cmp-nvim-lsp",
  82. },
  83. {
  84. "saadparwaiz1/cmp_luasnip",
  85. },
  86. {
  87. "hrsh7th/cmp-buffer",
  88. },
  89. {
  90. "hrsh7th/cmp-path",
  91. },
  92. {
  93. "folke/lua-dev.nvim",
  94. module = "lua-dev",
  95. },
  96. -- Autopairs
  97. {
  98. "windwp/nvim-autopairs",
  99. -- event = "InsertEnter",
  100. config = function()
  101. require("lvim.core.autopairs").setup()
  102. end,
  103. disable = not lvim.builtin.autopairs.active,
  104. },
  105. -- Treesitter
  106. {
  107. "nvim-treesitter/nvim-treesitter",
  108. branch = vim.fn.has "nvim-0.6" == 1 and "master" or "0.5-compat",
  109. -- run = ":TSUpdate",
  110. config = function()
  111. require("lvim.core.treesitter").setup()
  112. end,
  113. },
  114. {
  115. "JoosepAlviste/nvim-ts-context-commentstring",
  116. event = "BufReadPost",
  117. },
  118. -- NvimTree
  119. {
  120. "kyazdani42/nvim-tree.lua",
  121. -- event = "BufWinOpen",
  122. -- cmd = "NvimTreeToggle",
  123. config = function()
  124. require("lvim.core.nvimtree").setup()
  125. end,
  126. disable = not lvim.builtin.nvimtree.active,
  127. },
  128. {
  129. "lewis6991/gitsigns.nvim",
  130. config = function()
  131. require("lvim.core.gitsigns").setup()
  132. end,
  133. event = "BufRead",
  134. disable = not lvim.builtin.gitsigns.active,
  135. },
  136. -- Whichkey
  137. {
  138. "folke/which-key.nvim",
  139. config = function()
  140. require("lvim.core.which-key").setup()
  141. end,
  142. event = "BufWinEnter",
  143. disable = not lvim.builtin.which_key.active,
  144. },
  145. -- Comments
  146. {
  147. "numToStr/Comment.nvim",
  148. event = "BufRead",
  149. config = function()
  150. require("lvim.core.comment").setup()
  151. end,
  152. disable = not lvim.builtin.comment.active,
  153. },
  154. -- project.nvim
  155. {
  156. "ahmedkhalf/project.nvim",
  157. config = function()
  158. require("lvim.core.project").setup()
  159. end,
  160. disable = not lvim.builtin.project.active,
  161. },
  162. -- Icons
  163. { "kyazdani42/nvim-web-devicons" },
  164. -- Status Line and Bufferline
  165. {
  166. -- "hoob3rt/lualine.nvim",
  167. "nvim-lualine/lualine.nvim",
  168. -- "Lunarvim/lualine.nvim",
  169. config = function()
  170. require("lvim.core.lualine").setup()
  171. end,
  172. disable = not lvim.builtin.lualine.active,
  173. },
  174. {
  175. "akinsho/bufferline.nvim",
  176. config = function()
  177. require("lvim.core.bufferline").setup()
  178. end,
  179. branch = "main",
  180. event = "BufWinEnter",
  181. disable = not lvim.builtin.bufferline.active,
  182. },
  183. -- Debugging
  184. {
  185. "mfussenegger/nvim-dap",
  186. -- event = "BufWinEnter",
  187. config = function()
  188. require("lvim.core.dap").setup()
  189. end,
  190. disable = not lvim.builtin.dap.active,
  191. },
  192. -- Debugger management
  193. {
  194. "Pocco81/DAPInstall.nvim",
  195. -- event = "BufWinEnter",
  196. -- event = "BufRead",
  197. disable = not lvim.builtin.dap.active,
  198. },
  199. -- alpha
  200. {
  201. "goolord/alpha-nvim",
  202. config = function()
  203. require("lvim.core.alpha").setup()
  204. end,
  205. disable = not lvim.builtin.alpha.active,
  206. },
  207. -- Terminal
  208. {
  209. "akinsho/toggleterm.nvim",
  210. event = "BufWinEnter",
  211. branch = "main",
  212. config = function()
  213. require("lvim.core.terminal").setup()
  214. end,
  215. disable = not lvim.builtin.terminal.active,
  216. },
  217. -- SchemaStore
  218. {
  219. "b0o/schemastore.nvim",
  220. },
  221. }
  222. for _, entry in ipairs(core_plugins) do
  223. if not os.getenv "LVIM_DEV_MODE" then
  224. entry["lock"] = true
  225. end
  226. end
  227. return core_plugins