diff options
| author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-09-26 10:15:18 -0400 |
|---|---|---|
| committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-09-26 10:15:18 -0400 |
| commit | 2c4d9eba1fae8c8f2aae845ca33ed07317bf4501 (patch) | |
| tree | 8baaa32091ab99759b23a281b255653a62232816 | |
| parent | 1f7046e49dcae4757757bdea6df82f09a2c7a78a (diff) | |
Add ignore file. remove packer_compiled from tracking as will be different on different machines.
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | plugin/packer_compiled.lua | 184 |
2 files changed, 1 insertions, 184 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c84aa4a --- /dev/null +++ b/.gitignore | |||
| @@ -0,0 +1 @@ | |||
| plugin/packer_compiled.lua | |||
diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua deleted file mode 100644 index dd9d96d..0000000 --- a/plugin/packer_compiled.lua +++ /dev/null | |||
| @@ -1,184 +0,0 @@ | |||
| 1 | -- Automatically generated packer.nvim plugin loader code | ||
| 2 | |||
| 3 | if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then | ||
| 4 | vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') | ||
| 5 | return | ||
| 6 | end | ||
| 7 | |||
| 8 | vim.api.nvim_command('packadd packer.nvim') | ||
| 9 | |||
| 10 | local no_errors, error_msg = pcall(function() | ||
| 11 | |||
| 12 | _G._packer = _G._packer or {} | ||
| 13 | _G._packer.inside_compile = true | ||
| 14 | |||
| 15 | local time | ||
| 16 | local profile_info | ||
| 17 | local should_profile = false | ||
| 18 | if should_profile then | ||
| 19 | local hrtime = vim.loop.hrtime | ||
| 20 | profile_info = {} | ||
| 21 | time = function(chunk, start) | ||
| 22 | if start then | ||
| 23 | profile_info[chunk] = hrtime() | ||
| 24 | else | ||
| 25 | profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 | ||
| 26 | end | ||
| 27 | end | ||
| 28 | else | ||
| 29 | time = function(chunk, start) end | ||
| 30 | end | ||
| 31 | |||
| 32 | local function save_profiles(threshold) | ||
| 33 | local sorted_times = {} | ||
| 34 | for chunk_name, time_taken in pairs(profile_info) do | ||
| 35 | sorted_times[#sorted_times + 1] = {chunk_name, time_taken} | ||
| 36 | end | ||
| 37 | table.sort(sorted_times, function(a, b) return a[2] > b[2] end) | ||
| 38 | local results = {} | ||
| 39 | for i, elem in ipairs(sorted_times) do | ||
| 40 | if not threshold or threshold and elem[2] > threshold then | ||
| 41 | results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' | ||
| 42 | end | ||
| 43 | end | ||
| 44 | if threshold then | ||
| 45 | table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') | ||
| 46 | end | ||
| 47 | |||
| 48 | _G._packer.profile_output = results | ||
| 49 | end | ||
| 50 | |||
| 51 | time([[Luarocks path setup]], true) | ||
| 52 | local package_path_str = "/home/zberwaldt/.cache/nvim/packer_hererocks/2.1.1692716794/share/lua/5.1/?.lua;/home/zberwaldt/.cache/nvim/packer_hererocks/2.1.1692716794/share/lua/5.1/?/init.lua;/home/zberwaldt/.cache/nvim/packer_hererocks/2.1.1692716794/lib/luarocks/rocks-5.1/?.lua;/home/zberwaldt/.cache/nvim/packer_hererocks/2.1.1692716794/lib/luarocks/rocks-5.1/?/init.lua" | ||
| 53 | local install_cpath_pattern = "/home/zberwaldt/.cache/nvim/packer_hererocks/2.1.1692716794/lib/lua/5.1/?.so" | ||
| 54 | if not string.find(package.path, package_path_str, 1, true) then | ||
| 55 | package.path = package.path .. ';' .. package_path_str | ||
| 56 | end | ||
| 57 | |||
| 58 | if not string.find(package.cpath, install_cpath_pattern, 1, true) then | ||
| 59 | package.cpath = package.cpath .. ';' .. install_cpath_pattern | ||
| 60 | end | ||
| 61 | |||
| 62 | time([[Luarocks path setup]], false) | ||
| 63 | time([[try_loadstring definition]], true) | ||
| 64 | local function try_loadstring(s, component, name) | ||
| 65 | local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) | ||
| 66 | if not success then | ||
| 67 | vim.schedule(function() | ||
| 68 | vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) | ||
| 69 | end) | ||
| 70 | end | ||
| 71 | return result | ||
| 72 | end | ||
| 73 | |||
| 74 | time([[try_loadstring definition]], false) | ||
| 75 | time([[Defining packer_plugins]], true) | ||
| 76 | _G.packer_plugins = { | ||
| 77 | LuaSnip = { | ||
| 78 | loaded = true, | ||
| 79 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/LuaSnip", | ||
| 80 | url = "https://github.com/L3MON4D3/LuaSnip" | ||
| 81 | }, | ||
| 82 | ["cmp-nvim-lsp"] = { | ||
| 83 | loaded = true, | ||
| 84 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", | ||
| 85 | url = "https://github.com/hrsh7th/cmp-nvim-lsp" | ||
| 86 | }, | ||
| 87 | harpoon = { | ||
| 88 | loaded = true, | ||
| 89 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/harpoon", | ||
| 90 | url = "https://github.com/theprimeagen/harpoon" | ||
| 91 | }, | ||
| 92 | ["lsp-zero.nvim"] = { | ||
| 93 | loaded = true, | ||
| 94 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", | ||
| 95 | url = "https://github.com/VonHeikemen/lsp-zero.nvim" | ||
| 96 | }, | ||
| 97 | ["mason-lspconfig.nvim"] = { | ||
| 98 | loaded = true, | ||
| 99 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", | ||
| 100 | url = "https://github.com/williamboman/mason-lspconfig.nvim" | ||
| 101 | }, | ||
| 102 | ["mason.nvim"] = { | ||
| 103 | loaded = true, | ||
| 104 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/mason.nvim", | ||
| 105 | url = "https://github.com/williamboman/mason.nvim" | ||
| 106 | }, | ||
| 107 | ["nvim-cmp"] = { | ||
| 108 | loaded = true, | ||
| 109 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/nvim-cmp", | ||
| 110 | url = "https://github.com/hrsh7th/nvim-cmp" | ||
| 111 | }, | ||
| 112 | ["nvim-lspconfig"] = { | ||
| 113 | loaded = true, | ||
| 114 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", | ||
| 115 | url = "https://github.com/neovim/nvim-lspconfig" | ||
| 116 | }, | ||
| 117 | ["nvim-treesitter"] = { | ||
| 118 | loaded = true, | ||
| 119 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/nvim-treesitter", | ||
| 120 | url = "https://github.com/nvim-treesitter/nvim-treesitter" | ||
| 121 | }, | ||
| 122 | onedark = { | ||
| 123 | 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" }, | ||
| 124 | loaded = true, | ||
| 125 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/onedark", | ||
| 126 | url = "https://github.com/navarasu/onedark.nvim" | ||
| 127 | }, | ||
| 128 | ["packer.nvim"] = { | ||
| 129 | loaded = true, | ||
| 130 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/packer.nvim", | ||
| 131 | url = "https://github.com/wbthomason/packer.nvim" | ||
| 132 | }, | ||
| 133 | playground = { | ||
| 134 | loaded = true, | ||
| 135 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/playground", | ||
| 136 | url = "https://github.com/nvim-treesitter/playground" | ||
| 137 | }, | ||
| 138 | ["plenary.nvim"] = { | ||
| 139 | loaded = true, | ||
| 140 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/plenary.nvim", | ||
| 141 | url = "https://github.com/nvim-lua/plenary.nvim" | ||
| 142 | }, | ||
| 143 | ["telescope.nvim"] = { | ||
| 144 | loaded = true, | ||
| 145 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/telescope.nvim", | ||
| 146 | url = "https://github.com/nvim-telescope/telescope.nvim" | ||
| 147 | }, | ||
| 148 | undotree = { | ||
| 149 | loaded = true, | ||
| 150 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/undotree", | ||
| 151 | url = "https://github.com/mbbill/undotree" | ||
| 152 | }, | ||
| 153 | ["vim-fugitive"] = { | ||
| 154 | loaded = true, | ||
| 155 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/vim-fugitive", | ||
| 156 | url = "https://github.com/tpope/vim-fugitive" | ||
| 157 | }, | ||
| 158 | vimwiki = { | ||
| 159 | loaded = true, | ||
| 160 | path = "/home/zberwaldt/.local/share/nvim/site/pack/packer/start/vimwiki", | ||
| 161 | url = "https://github.com/vimwiki/vimwiki" | ||
| 162 | } | ||
| 163 | } | ||
| 164 | |||
| 165 | time([[Defining packer_plugins]], false) | ||
| 166 | -- Config for: onedark | ||
| 167 | time([[Config for onedark]], true) | ||
| 168 | 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") | ||
| 169 | time([[Config for onedark]], false) | ||
| 170 | |||
| 171 | _G._packer.inside_compile = false | ||
| 172 | if _G._packer.needs_bufread == true then | ||
| 173 | vim.cmd("doautocmd BufRead") | ||
| 174 | end | ||
| 175 | _G._packer.needs_bufread = false | ||
| 176 | |||
| 177 | if should_profile then save_profiles() end | ||
| 178 | |||
| 179 | end) | ||
| 180 | |||
| 181 | if not no_errors then | ||
| 182 | error_msg = error_msg:gsub('"', '\\"') | ||
| 183 | vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') | ||
| 184 | end | ||
