plugins.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. {
  167. "kyazdani42/nvim-web-devicons",
  168. disable = not lvim.use_icons,
  169. },
  170. -- Status Line and Bufferline
  171. {
  172. -- "hoob3rt/lualine.nvim",
  173. "nvim-lualine/lualine.nvim",
  174. -- "Lunarvim/lualine.nvim",
  175. config = function()
  176. require("lvim.core.lualine").setup()
  177. end,
  178. disable = not lvim.builtin.lualine.active,
  179. },
  180. {
  181. "akinsho/bufferline.nvim",
  182. config = function()
  183. require("lvim.core.bufferline").setup()
  184. end,
  185. branch = "main",
  186. event = "BufWinEnter",
  187. disable = not lvim.builtin.bufferline.active,
  188. },
  189. -- Debugging
  190. {
  191. "mfussenegger/nvim-dap",
  192. -- event = "BufWinEnter",
  193. config = function()
  194. require("lvim.core.dap").setup()
  195. end,
  196. disable = not lvim.builtin.dap.active,
  197. },
  198. -- Debugger management
  199. {
  200. "Pocco81/DAPInstall.nvim",
  201. -- event = "BufWinEnter",
  202. -- event = "BufRead",
  203. disable = not lvim.builtin.dap.active,
  204. },
  205. -- alpha
  206. {
  207. "goolord/alpha-nvim",
  208. config = function()
  209. require("lvim.core.alpha").setup()
  210. end,
  211. disable = not lvim.builtin.alpha.active,
  212. },
  213. -- Terminal
  214. {
  215. "akinsho/toggleterm.nvim",
  216. event = "BufWinEnter",
  217. branch = "main",
  218. config = function()
  219. require("lvim.core.terminal").setup()
  220. end,
  221. disable = not lvim.builtin.terminal.active,
  222. },
  223. -- SchemaStore
  224. {
  225. "b0o/schemastore.nvim",
  226. },
  227. }
  228. for _, entry in ipairs(core_plugins) do
  229. if not os.getenv "LVIM_DEV_MODE" then
  230. entry["lock"] = true
  231. end
  232. end
  233. return core_plugins