plugins.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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. "folke/lua-dev.nvim",
  98. module = "lua-dev",
  99. },
  100. -- Autopairs
  101. {
  102. "windwp/nvim-autopairs",
  103. -- event = "InsertEnter",
  104. config = function()
  105. require("lvim.core.autopairs").setup()
  106. end,
  107. disable = not lvim.builtin.autopairs.active,
  108. },
  109. -- Treesitter
  110. {
  111. "nvim-treesitter/nvim-treesitter",
  112. -- run = ":TSUpdate",
  113. config = function()
  114. require("lvim.core.treesitter").setup()
  115. end,
  116. },
  117. {
  118. "JoosepAlviste/nvim-ts-context-commentstring",
  119. event = "BufReadPost",
  120. },
  121. -- NvimTree
  122. {
  123. "kyazdani42/nvim-tree.lua",
  124. -- event = "BufWinOpen",
  125. -- cmd = "NvimTreeToggle",
  126. config = function()
  127. require("lvim.core.nvimtree").setup()
  128. end,
  129. disable = not lvim.builtin.nvimtree.active,
  130. },
  131. {
  132. "lewis6991/gitsigns.nvim",
  133. config = function()
  134. require("lvim.core.gitsigns").setup()
  135. end,
  136. event = "BufRead",
  137. disable = not lvim.builtin.gitsigns.active,
  138. },
  139. -- Whichkey
  140. {
  141. "folke/which-key.nvim",
  142. config = function()
  143. require("lvim.core.which-key").setup()
  144. end,
  145. event = "BufWinEnter",
  146. disable = not lvim.builtin.which_key.active,
  147. },
  148. -- Comments
  149. {
  150. "numToStr/Comment.nvim",
  151. event = "BufRead",
  152. config = function()
  153. require("lvim.core.comment").setup()
  154. end,
  155. disable = not lvim.builtin.comment.active,
  156. },
  157. -- project.nvim
  158. {
  159. "ahmedkhalf/project.nvim",
  160. config = function()
  161. require("lvim.core.project").setup()
  162. end,
  163. disable = not lvim.builtin.project.active,
  164. },
  165. -- Icons
  166. { "kyazdani42/nvim-web-devicons" },
  167. -- Status Line and Bufferline
  168. {
  169. -- "hoob3rt/lualine.nvim",
  170. "nvim-lualine/lualine.nvim",
  171. -- "Lunarvim/lualine.nvim",
  172. config = function()
  173. require("lvim.core.lualine").setup()
  174. end,
  175. disable = not lvim.builtin.lualine.active,
  176. },
  177. {
  178. "akinsho/bufferline.nvim",
  179. config = function()
  180. require("lvim.core.bufferline").setup()
  181. end,
  182. branch = "main",
  183. event = "BufWinEnter",
  184. disable = not lvim.builtin.bufferline.active,
  185. },
  186. -- Debugging
  187. {
  188. "mfussenegger/nvim-dap",
  189. -- event = "BufWinEnter",
  190. config = function()
  191. require("lvim.core.dap").setup()
  192. end,
  193. disable = not lvim.builtin.dap.active,
  194. },
  195. -- Debugger management
  196. {
  197. "Pocco81/DAPInstall.nvim",
  198. -- event = "BufWinEnter",
  199. -- event = "BufRead",
  200. disable = not lvim.builtin.dap.active,
  201. },
  202. -- alpha
  203. {
  204. "goolord/alpha-nvim",
  205. config = function()
  206. require("lvim.core.alpha").setup()
  207. end,
  208. disable = not lvim.builtin.alpha.active,
  209. },
  210. -- Terminal
  211. {
  212. "akinsho/toggleterm.nvim",
  213. event = "BufWinEnter",
  214. branch = "main",
  215. config = function()
  216. require("lvim.core.terminal").setup()
  217. end,
  218. disable = not lvim.builtin.terminal.active,
  219. },
  220. -- SchemaStore
  221. {
  222. "b0o/schemastore.nvim",
  223. },
  224. }
  225. for _, entry in ipairs(core_plugins) do
  226. if not os.getenv "LVIM_DEV_MODE" then
  227. entry["lock"] = true
  228. end
  229. end
  230. return core_plugins