snippets n stuff

This commit is contained in:
Norm Rasmussen
2022-09-09 17:45:28 -04:00
parent 3f08a95c7b
commit dd746988b8
3 changed files with 76 additions and 96 deletions

View File

@ -9,23 +9,26 @@ vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
else
time = function(chunk, start) end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
@ -38,8 +41,10 @@ local function save_profiles(threshold)
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer = _G._packer or {}
_G._packer.profile_output = results
end
@ -79,56 +84,26 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/alpha-nvim",
url = "https://github.com/goolord/alpha-nvim"
},
["cheatsheet.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cheatsheet.nvim",
url = "https://github.com/sudormrfbin/cheatsheet.nvim"
},
["cmp-buffer"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-calc"] = {
["cmp-cmdline"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-calc",
url = "https://github.com/hrsh7th/cmp-calc"
},
["cmp-emoji"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-emoji",
url = "https://github.com/hrsh7th/cmp-emoji"
},
["cmp-look"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-look",
url = "https://github.com/hrsh7th/cmp-look"
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
url = "https://github.com/hrsh7th/cmp-cmdline"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-nvim-ultisnips"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-nvim-ultisnips",
url = "https://github.com/quangnguyen30192/cmp-nvim-ultisnips"
},
["cmp-path"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
["cmp-spell"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-spell",
url = "https://github.com/f3fora/cmp-spell"
},
["cmp-tabnine"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-tabnine",
url = "https://github.com/tzachar/cmp-tabnine"
},
cmp_luasnip = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
@ -159,6 +134,11 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/follow-md-links.nvim",
url = "https://github.com/jghauser/follow-md-links.nvim"
},
["friendly-snippets"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets"
},
["gitsigns.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
@ -169,11 +149,6 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gloombuddy",
url = "https://github.com/bkegley/gloombuddy"
},
["glow.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/glow.nvim",
url = "https://github.com/ellisonleao/glow.nvim"
},
["headlines.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/headlines.nvim",
@ -194,6 +169,22 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/marks.nvim",
url = "https://github.com/chentoast/marks.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["mind.nvim"] = {
config = { "\27LJ\2\n2\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\tmind\frequire\0" },
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mind.nvim",
url = "https://github.com/phaazon/mind.nvim"
},
["mkdnflow.nvim"] = {
config = { "\27LJ\2\n<EFBFBD>\2\0\0\6\0\21\0\0296\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\19\0005\3\5\0005\4\4\0005\5\3\0>\5\1\4=\4\6\0035\4\b\0005\5\a\0>\5\1\4=\4\t\0035\4\v\0005\5\n\0>\5\1\4=\4\f\0035\4\14\0005\5\r\0>\5\1\4=\4\15\0035\4\17\0005\5\16\0>\5\1\4=\4\18\3=\3\20\2B\0\2\1K\0\1\0\rmappings\1\0\0\rMkdnSTab\1\3\0\0\0\f<S-Tab>\1\2\0\0\6i\fMkdnTab\1\3\0\0\0\n<Tab>\1\2\0\0\6i\14MkdnEnter\1\3\0\0\0\t<CR>\1\2\0\0\6n\20MkdnNewListItem\1\3\0\0\0\t<CR>\1\2\0\0\6i\19MkdnToggleToDo\1\0\1\22MkdnTableNextCell\1\1\3\0\0\0\14<C-Space>\1\3\0\0\6i\6n\nsetup\rmkdnflow\frequire\0" },
loaded = true,
@ -226,16 +217,16 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lsp-installer"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
url = "https://github.com/williamboman/nvim-lsp-installer"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-notify"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-notify",
url = "https://github.com/rcarriga/nvim-notify"
},
["nvim-tree.lua"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
@ -261,16 +252,6 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["popup.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/popup.nvim",
url = "https://github.com/nvim-lua/popup.nvim"
},
["prettier.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/prettier.nvim",
url = "https://github.com/MunifTanjim/prettier.nvim"
},
["rose-pine"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/rose-pine",
@ -281,11 +262,11 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
url = "https://github.com/simrat39/symbols-outline.nvim"
},
["toggleterm.nvim"] = {
config = { "\27LJ\2\nX\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\1\nshell\23/usr/bin/local/zsh\nsetup\15toggleterm\frequire\0" },
["todo-comments.nvim"] = {
config = { "\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0" },
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
url = "https://github.com/akinsho/toggleterm.nvim"
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
url = "https://github.com/folke/todo-comments.nvim"
},
["tokyonight.nvim"] = {
loaded = true,
@ -303,11 +284,6 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vem-tabline",
url = "https://github.com/pacha/vem-tabline"
},
["vim-tmux-navigator"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator",
url = "https://github.com/christoomey/vim-tmux-navigator"
},
["vim-wakatime"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-wakatime",
@ -321,10 +297,18 @@ _G.packer_plugins = {
}
time([[Defining packer_plugins]], false)
-- Config for: toggleterm.nvim
time([[Config for toggleterm.nvim]], true)
try_loadstring("\27LJ\2\nX\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\1\nshell\23/usr/bin/local/zsh\nsetup\15toggleterm\frequire\0", "config", "toggleterm.nvim")
time([[Config for toggleterm.nvim]], false)
-- Config for: trouble.nvim
time([[Config for trouble.nvim]], true)
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0", "config", "trouble.nvim")
time([[Config for trouble.nvim]], false)
-- Config for: todo-comments.nvim
time([[Config for todo-comments.nvim]], true)
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0", "config", "todo-comments.nvim")
time([[Config for todo-comments.nvim]], false)
-- Config for: mind.nvim
time([[Config for mind.nvim]], true)
try_loadstring("\27LJ\2\n2\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\tmind\frequire\0", "config", "mind.nvim")
time([[Config for mind.nvim]], false)
-- Config for: nvim-autopairs
time([[Config for nvim-autopairs]], true)
try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
@ -333,10 +317,13 @@ time([[Config for nvim-autopairs]], false)
time([[Config for mkdnflow.nvim]], true)
try_loadstring("\27LJ\2\n<EFBFBD>\2\0\0\6\0\21\0\0296\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\19\0005\3\5\0005\4\4\0005\5\3\0>\5\1\4=\4\6\0035\4\b\0005\5\a\0>\5\1\4=\4\t\0035\4\v\0005\5\n\0>\5\1\4=\4\f\0035\4\14\0005\5\r\0>\5\1\4=\4\15\0035\4\17\0005\5\16\0>\5\1\4=\4\18\3=\3\20\2B\0\2\1K\0\1\0\rmappings\1\0\0\rMkdnSTab\1\3\0\0\0\f<S-Tab>\1\2\0\0\6i\fMkdnTab\1\3\0\0\0\n<Tab>\1\2\0\0\6i\14MkdnEnter\1\3\0\0\0\t<CR>\1\2\0\0\6n\20MkdnNewListItem\1\3\0\0\0\t<CR>\1\2\0\0\6i\19MkdnToggleToDo\1\0\1\22MkdnTableNextCell\1\1\3\0\0\0\14<C-Space>\1\3\0\0\6i\6n\nsetup\rmkdnflow\frequire\0", "config", "mkdnflow.nvim")
time([[Config for mkdnflow.nvim]], false)
-- Config for: trouble.nvim
time([[Config for trouble.nvim]], true)
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0", "config", "trouble.nvim")
time([[Config for trouble.nvim]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)