Neovim configs for 2023. Hopefully they last.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
7.9 KiB

2 years ago
2 years ago
  1. -- Automatically generated packer.nvim plugin loader code
  2. if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
  3. vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
  4. return
  5. end
  6. vim.api.nvim_command('packadd packer.nvim')
  7. local no_errors, error_msg = pcall(function()
  8. _G._packer = _G._packer or {}
  9. _G._packer.inside_compile = true
  10. local time
  11. local profile_info
  12. local should_profile = false
  13. if should_profile then
  14. local hrtime = vim.loop.hrtime
  15. profile_info = {}
  16. time = function(chunk, start)
  17. if start then
  18. profile_info[chunk] = hrtime()
  19. else
  20. profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
  21. end
  22. end
  23. else
  24. time = function(chunk, start) end
  25. end
  26. local function save_profiles(threshold)
  27. local sorted_times = {}
  28. for chunk_name, time_taken in pairs(profile_info) do
  29. sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
  30. end
  31. table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
  32. local results = {}
  33. for i, elem in ipairs(sorted_times) do
  34. if not threshold or threshold and elem[2] > threshold then
  35. results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
  36. end
  37. end
  38. if threshold then
  39. table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
  40. end
  41. _G._packer.profile_output = results
  42. end
  43. time([[Luarocks path setup]], true)
  44. local package_path_str = "/home/junikim/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/junikim/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/junikim/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/junikim/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
  45. local install_cpath_pattern = "/home/junikim/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
  46. if not string.find(package.path, package_path_str, 1, true) then
  47. package.path = package.path .. ';' .. package_path_str
  48. end
  49. if not string.find(package.cpath, install_cpath_pattern, 1, true) then
  50. package.cpath = package.cpath .. ';' .. install_cpath_pattern
  51. end
  52. time([[Luarocks path setup]], false)
  53. time([[try_loadstring definition]], true)
  54. local function try_loadstring(s, component, name)
  55. local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
  56. if not success then
  57. vim.schedule(function()
  58. vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
  59. end)
  60. end
  61. return result
  62. end
  63. time([[try_loadstring definition]], false)
  64. time([[Defining packer_plugins]], true)
  65. _G.packer_plugins = {
  66. LuaSnip = {
  67. loaded = true,
  68. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/LuaSnip",
  69. url = "https://github.com/L3MON4D3/LuaSnip"
  70. },
  71. ["barbar.nvim"] = {
  72. loaded = true,
  73. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/barbar.nvim",
  74. url = "https://github.com/romgrk/barbar.nvim",
  75. wants = { "nvim-web-devicons" }
  76. },
  77. ["cmp-buffer"] = {
  78. loaded = true,
  79. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/cmp-buffer",
  80. url = "https://github.com/hrsh7th/cmp-buffer"
  81. },
  82. ["cmp-nvim-lsp"] = {
  83. loaded = true,
  84. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
  85. url = "https://github.com/hrsh7th/cmp-nvim-lsp"
  86. },
  87. ["cmp-nvim-lua"] = {
  88. loaded = true,
  89. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
  90. url = "https://github.com/hrsh7th/cmp-nvim-lua"
  91. },
  92. ["cmp-path"] = {
  93. loaded = true,
  94. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/cmp-path",
  95. url = "https://github.com/hrsh7th/cmp-path"
  96. },
  97. cmp_luasnip = {
  98. loaded = true,
  99. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
  100. url = "https://github.com/saadparwaiz1/cmp_luasnip"
  101. },
  102. ["emmet-vim"] = {
  103. loaded = true,
  104. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/emmet-vim",
  105. url = "https://github.com/mattn/emmet-vim"
  106. },
  107. ["friendly-snippets"] = {
  108. loaded = true,
  109. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/friendly-snippets",
  110. url = "https://github.com/rafamadriz/friendly-snippets"
  111. },
  112. ["lsp-zero.nvim"] = {
  113. loaded = true,
  114. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
  115. url = "https://github.com/VonHeikemen/lsp-zero.nvim"
  116. },
  117. ["mason-lspconfig.nvim"] = {
  118. loaded = true,
  119. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
  120. url = "https://github.com/williamboman/mason-lspconfig.nvim"
  121. },
  122. ["mason.nvim"] = {
  123. loaded = true,
  124. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/mason.nvim",
  125. url = "https://github.com/williamboman/mason.nvim"
  126. },
  127. ["nvim-cmp"] = {
  128. loaded = true,
  129. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/nvim-cmp",
  130. url = "https://github.com/hrsh7th/nvim-cmp"
  131. },
  132. ["nvim-lspconfig"] = {
  133. loaded = true,
  134. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
  135. url = "https://github.com/neovim/nvim-lspconfig"
  136. },
  137. ["nvim-tree.lua"] = {
  138. loaded = true,
  139. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
  140. url = "https://github.com/nvim-tree/nvim-tree.lua"
  141. },
  142. ["nvim-treesitter"] = {
  143. loaded = true,
  144. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
  145. url = "https://github.com/nvim-treesitter/nvim-treesitter"
  146. },
  147. ["nvim-web-devicons"] = {
  148. loaded = true,
  149. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
  150. url = "https://github.com/nvim-tree/nvim-web-devicons"
  151. },
  152. ["onedark.vim"] = {
  153. config = { "\27LJ\2\n7\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\24colorscheme onedark\bcmd\bvim\0" },
  154. loaded = true,
  155. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/onedark.vim",
  156. url = "https://github.com/joshdick/onedark.vim"
  157. },
  158. ["packer.nvim"] = {
  159. loaded = true,
  160. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/packer.nvim",
  161. url = "https://github.com/wbthomason/packer.nvim"
  162. },
  163. ["plenary.nvim"] = {
  164. loaded = true,
  165. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/plenary.nvim",
  166. url = "https://github.com/nvim-lua/plenary.nvim"
  167. },
  168. ["telescope.nvim"] = {
  169. loaded = true,
  170. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/telescope.nvim",
  171. url = "https://github.com/nvim-telescope/telescope.nvim"
  172. },
  173. ["vim-airline"] = {
  174. loaded = true,
  175. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/vim-airline",
  176. url = "https://github.com/vim-airline/vim-airline"
  177. },
  178. ["vim-airline-themes"] = {
  179. loaded = true,
  180. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/vim-airline-themes",
  181. url = "https://github.com/vim-airline/vim-airline-themes"
  182. },
  183. ["vim-autoclose"] = {
  184. loaded = true,
  185. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/vim-autoclose",
  186. url = "https://github.com/Townk/vim-autoclose"
  187. },
  188. vimtex = {
  189. loaded = true,
  190. path = "/home/junikim/.local/share/nvim/site/pack/packer/start/vimtex",
  191. url = "https://github.com/lervag/vimtex"
  192. }
  193. }
  194. time([[Defining packer_plugins]], false)
  195. -- Config for: onedark.vim
  196. time([[Config for onedark.vim]], true)
  197. try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\24colorscheme onedark\bcmd\bvim\0", "config", "onedark.vim")
  198. time([[Config for onedark.vim]], false)
  199. _G._packer.inside_compile = false
  200. if _G._packer.needs_bufread == true then
  201. vim.cmd("doautocmd BufRead")
  202. end
  203. _G._packer.needs_bufread = false
  204. if should_profile then save_profiles() end
  205. end)
  206. if not no_errors then
  207. error_msg = error_msg:gsub('"', '\\"')
  208. vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
  209. end