plugins.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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. local paths = {
  71. utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets"),
  72. }
  73. local user_snippets = utils.join_paths(get_config_dir(), "snippets")
  74. if utils.is_directory(user_snippets) then
  75. paths[#paths + 1] = user_snippets
  76. end
  77. require("luasnip.loaders.from_lua").lazy_load()
  78. require("luasnip.loaders.from_vscode").lazy_load {
  79. paths = paths,
  80. }
  81. require("luasnip.loaders.from_snipmate").lazy_load()
  82. end,
  83. },
  84. {
  85. "hrsh7th/cmp-nvim-lsp",
  86. },
  87. {
  88. "saadparwaiz1/cmp_luasnip",
  89. },
  90. {
  91. "hrsh7th/cmp-buffer",
  92. },
  93. {
  94. "hrsh7th/cmp-path",
  95. },
  96. {
  97. -- NOTE: Temporary fix till folke comes back
  98. "max397574/lua-dev.nvim",
  99. module = "lua-dev",
  100. },
  101. -- Autopairs
  102. {
  103. "windwp/nvim-autopairs",
  104. -- event = "InsertEnter",
  105. config = function()
  106. require("lvim.core.autopairs").setup()
  107. end,
  108. disable = not lvim.builtin.autopairs.active,
  109. },
  110. -- Treesitter
  111. {
  112. "nvim-treesitter/nvim-treesitter",
  113. -- run = ":TSUpdate",
  114. config = function()
  115. require("lvim.core.treesitter").setup()
  116. end,
  117. },
  118. {
  119. "JoosepAlviste/nvim-ts-context-commentstring",
  120. event = "BufReadPost",
  121. },
  122. -- NvimTree
  123. {
  124. "kyazdani42/nvim-tree.lua",
  125. -- event = "BufWinOpen",
  126. -- cmd = "NvimTreeToggle",
  127. config = function()
  128. require("lvim.core.nvimtree").setup()
  129. end,
  130. disable = not lvim.builtin.nvimtree.active,
  131. },
  132. {
  133. "lewis6991/gitsigns.nvim",
  134. config = function()
  135. require("lvim.core.gitsigns").setup()
  136. end,
  137. event = "BufRead",
  138. disable = not lvim.builtin.gitsigns.active,
  139. },
  140. -- Whichkey
  141. {
  142. "folke/which-key.nvim",
  143. config = function()
  144. require("lvim.core.which-key").setup()
  145. end,
  146. event = "BufWinEnter",
  147. disable = not lvim.builtin.which_key.active,
  148. },
  149. -- Comments
  150. {
  151. "numToStr/Comment.nvim",
  152. event = "BufRead",
  153. config = function()
  154. require("lvim.core.comment").setup()
  155. end,
  156. disable = not lvim.builtin.comment.active,
  157. },
  158. -- project.nvim
  159. {
  160. "ahmedkhalf/project.nvim",
  161. config = function()
  162. require("lvim.core.project").setup()
  163. end,
  164. disable = not lvim.builtin.project.active,
  165. },
  166. -- Icons
  167. {
  168. "kyazdani42/nvim-web-devicons",
  169. disable = not lvim.use_icons,
  170. },
  171. -- Status Line and Bufferline
  172. {
  173. -- "hoob3rt/lualine.nvim",
  174. "nvim-lualine/lualine.nvim",
  175. -- "Lunarvim/lualine.nvim",
  176. config = function()
  177. require("lvim.core.lualine").setup()
  178. end,
  179. disable = not lvim.builtin.lualine.active,
  180. },
  181. {
  182. "akinsho/bufferline.nvim",
  183. config = function()
  184. require("lvim.core.bufferline").setup()
  185. end,
  186. branch = "main",
  187. event = "BufWinEnter",
  188. disable = not lvim.builtin.bufferline.active,
  189. },
  190. -- Debugging
  191. {
  192. "mfussenegger/nvim-dap",
  193. -- event = "BufWinEnter",
  194. config = function()
  195. require("lvim.core.dap").setup()
  196. end,
  197. disable = not lvim.builtin.dap.active,
  198. },
  199. -- Debugger management
  200. {
  201. "Pocco81/DAPInstall.nvim",
  202. -- event = "BufWinEnter",
  203. -- event = "BufRead",
  204. disable = not lvim.builtin.dap.active,
  205. },
  206. -- alpha
  207. {
  208. "goolord/alpha-nvim",
  209. config = function()
  210. require("lvim.core.alpha").setup()
  211. end,
  212. disable = not lvim.builtin.alpha.active,
  213. },
  214. -- Terminal
  215. {
  216. "akinsho/toggleterm.nvim",
  217. event = "BufWinEnter",
  218. branch = "main",
  219. config = function()
  220. require("lvim.core.terminal").setup()
  221. end,
  222. disable = not lvim.builtin.terminal.active,
  223. },
  224. -- SchemaStore
  225. {
  226. "b0o/schemastore.nvim",
  227. },
  228. }
  229. for _, entry in ipairs(core_plugins) do
  230. if not os.getenv "LVIM_DEV_MODE" then
  231. entry["lock"] = true
  232. end
  233. end
  234. return core_plugins