plugins.lua 4.9 KB

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