From 910ffc0108a0987ab0bd225e80517702340ed686 Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Sun, 17 Jul 2022 23:52:18 -0700 Subject: [PATCH] startup speed improvements --- init.lua | 3 ++- lua/user/colorizer.lua | 19 +++++++++---------- lua/user/disable.lua | 25 +++++++++++++++++++++++++ lua/user/plugins.lua | 8 +++++++- 4 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 lua/user/disable.lua diff --git a/init.lua b/init.lua index b7aede6..0883342 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,5 @@ +require("user.disable") +require("user.impatient") require("user.options") require("user.keymaps") require("user.plugins") @@ -16,7 +18,6 @@ require("user.bufferline") require("user.whitespace") require("user.lualine") require("user.toggleterm") -require("user.impatient") require("user.indentline") require("user.alpha") require("user.whichkey") diff --git a/lua/user/colorizer.lua b/lua/user/colorizer.lua index 875aa13..11f1131 100644 --- a/lua/user/colorizer.lua +++ b/lua/user/colorizer.lua @@ -4,14 +4,13 @@ if not status_ok then end colorizer.setup({ "*" }, { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue oe blue - RRGGBBAA = true, -- #RRGGBBAA hex codes - rgb_fn = true, -- CSS rgb() and rgba() functions - hsl_fn = true, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes: foreground, background, virtualtext - mode = "background", -- Set the display mode.) + RGB = true, + RRGGBB = true, + names = false, + RRGGBBAA = true, + rgb_fn = true, + hsl_fn = true, + css = false, + css_fn = false, + mode = "background", }) diff --git a/lua/user/disable.lua b/lua/user/disable.lua new file mode 100644 index 0000000..40f8c74 --- /dev/null +++ b/lua/user/disable.lua @@ -0,0 +1,25 @@ +-- Disable some builtin vim plugins +local disabled_built_ins = { + "2html_plugin", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "matchparen", + "tar", + "tarPlugin", + "rrhelper", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", +} + +for _, plugin in pairs(disabled_built_ins) do + vim.g["loaded_" .. plugin] = 1 +end diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index 9f1804b..6597611 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -32,6 +32,10 @@ packer.init({ return require("packer.util").float({ border = "rounded" }) end, }, + profile = { + enable = true, + threshold = 0, + }, }) return packer.startup(function(use) @@ -112,8 +116,10 @@ return packer.startup(function(use) -- Toggleterm use("akinsho/toggleterm.nvim") - -- Impatient + -- Speed use("lewis6991/impatient.nvim") + use("nathom/filetype.nvim") + use("dstein64/vim-startuptime") -- Indent Line use("lukas-reineke/indent-blankline.nvim")