plugins.lua 5.0 KB

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