My dotfiles
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.

185 lines
6.3 KiB

  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/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
  45. local install_cpath_pattern = "/home/rinri/.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/rinri/.local/share/nvim/site/pack/packer/start/LuaSnip",
  69. url = "https://github.com/L3MON4D3/LuaSnip"
  70. },
  71. ["cmp-nvim-lsp"] = {
  72. loaded = true,
  73. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
  74. url = "https://github.com/hrsh7th/cmp-nvim-lsp"
  75. },
  76. cmp_luasnip = {
  77. loaded = true,
  78. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
  79. url = "https://github.com/saadparwaiz1/cmp_luasnip"
  80. },
  81. ["dashboard-nvim"] = {
  82. loaded = true,
  83. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/dashboard-nvim",
  84. url = "https://github.com/glepnir/dashboard-nvim"
  85. },
  86. ["lightline.vim"] = {
  87. loaded = true,
  88. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/lightline.vim",
  89. url = "https://github.com/itchyny/lightline.vim"
  90. },
  91. ["mason.nvim"] = {
  92. loaded = true,
  93. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/mason.nvim",
  94. url = "https://github.com/williamboman/mason.nvim"
  95. },
  96. nerdtree = {
  97. loaded = true,
  98. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nerdtree",
  99. url = "https://github.com/scrooloose/nerdtree"
  100. },
  101. ["nvim-cmp"] = {
  102. loaded = true,
  103. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nvim-cmp",
  104. url = "https://github.com/hrsh7th/nvim-cmp"
  105. },
  106. ["nvim-lspconfig"] = {
  107. loaded = true,
  108. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
  109. url = "https://github.com/neovim/nvim-lspconfig"
  110. },
  111. ["onedark.vim"] = {
  112. loaded = true,
  113. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/onedark.vim",
  114. url = "https://github.com/joshdick/onedark.vim"
  115. },
  116. ["packer.nvim"] = {
  117. loaded = true,
  118. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/packer.nvim",
  119. url = "https://github.com/wbthomason/packer.nvim"
  120. },
  121. ["suda.vim"] = {
  122. loaded = true,
  123. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/suda.vim",
  124. url = "https://github.com/lambdalisue/suda.vim"
  125. },
  126. syntastic = {
  127. loaded = true,
  128. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/syntastic",
  129. url = "https://github.com/vim-syntastic/syntastic"
  130. },
  131. ["vim-clang-format"] = {
  132. loaded = true,
  133. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-clang-format",
  134. url = "https://github.com/rhysd/vim-clang-format"
  135. },
  136. ["vim-css-color"] = {
  137. loaded = true,
  138. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-css-color",
  139. url = "https://github.com/ap/vim-css-color"
  140. },
  141. ["vim-devicons"] = {
  142. loaded = true,
  143. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-devicons",
  144. url = "https://github.com/ryanoasis/vim-devicons"
  145. },
  146. ["vim-lsp-cxx-highlight"] = {
  147. loaded = true,
  148. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-lsp-cxx-highlight",
  149. url = "https://github.com/jackguo380/vim-lsp-cxx-highlight"
  150. },
  151. ["vim-nerdtree-syntax-highlight"] = {
  152. loaded = true,
  153. path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-nerdtree-syntax-highlight",
  154. url = "https://github.com/tiagofumo/vim-nerdtree-syntax-highlight"
  155. }
  156. }
  157. time([[Defining packer_plugins]], false)
  158. _G._packer.inside_compile = false
  159. if _G._packer.needs_bufread == true then
  160. vim.cmd("doautocmd BufRead")
  161. end
  162. _G._packer.needs_bufread = false
  163. if should_profile then save_profiles() end
  164. end)
  165. if not no_errors then
  166. error_msg = error_msg:gsub('"', '\\"')
  167. vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
  168. end