From aa557b7d28c7579bb841c1a388779c040a2a9727 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 28 Sep 2022 22:50:45 -0500 Subject: [PATCH] perf(neovim): massive start up time improvements (~70 ms) --- .../primary/config/lua/plugins/mappings.lua | 7 +-- .../primary/config/lua/plugins/plugins.lua | 52 +++++++++++++------ 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua b/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua index a30c8253..96f99590 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua @@ -136,12 +136,7 @@ vim.keymap.set("n", "", ":BufferLineCycleNext", { silent = true, desc = vim.keymap.set("n", "", require("utils.funcs").close_buffer, { silent = true, desc = "Close Buffer" }) -- Vim Notify Mappings -vim.keymap.set( - "n", - "nv", - require("telescope").extensions.notify.notify, - { silent = true, desc = "Notifications: Search" } -) +vim.keymap.set("n", "nv", ":Telescope notify", { silent = true, desc = "Notifications: Search" }) vim.keymap.set("n", "nd", require("notify").dismiss, { silent = true, desc = "Notifications: Dismiss" }) -- Whichkey Mappings diff --git a/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua b/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua index 6728a6de..0b04fd9c 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua @@ -274,23 +274,17 @@ return packer.startup({ end, }) - -- Telescope Extensions - use({ - "nvim-telescope/telescope-fzf-native.nvim", - run = "make", - }) - - use({ - "nvim-telescope/telescope-media-files.nvim", - "nvim-telescope/telescope-file-browser.nvim", - "artart222/telescope_find_directories", - "nvim-telescope/telescope-ui-select.nvim", - { "nvim-telescope/telescope-smart-history.nvim", requires = "tami5/sqlite.lua" }, - }) - -- Telescope use({ "nvim-telescope/telescope.nvim", + requires = { + "nvim-telescope/telescope-media-files.nvim", + "nvim-telescope/telescope-file-browser.nvim", + "artart222/telescope_find_directories", + "nvim-telescope/telescope-ui-select.nvim", + { "nvim-telescope/telescope-smart-history.nvim", requires = "tami5/sqlite.lua" }, + { "nvim-telescope/telescope-fzf-native.nvim", run = "make" }, + }, config = function() require("plugins.configs.telescope-nvim") end, @@ -312,6 +306,7 @@ return packer.startup({ config = function() require("plugins.configs.neotree") end, + cmd = "Neotree", }) -- Lspconfig @@ -409,7 +404,6 @@ return packer.startup({ "hrsh7th/cmp-path", "hrsh7th/cmp-cmdline", "hrsh7th/cmp-emoji", - "hrsh7th/vim-vsnip", "hrsh7th/cmp-nvim-lsp-document-symbol", "hrsh7th/cmp-calc", "davidsierradz/cmp-conventionalcommits", @@ -592,6 +586,7 @@ return packer.startup({ }, }) end, + cmd = { "Neogit" }, requires = { "sindrets/diffview.nvim", }, @@ -620,6 +615,7 @@ return packer.startup({ "nvim-neorg/neorg-telescope", }, after = "nvim-treesitter", + ft = "norg", }) -- Log Syntax Highlighting @@ -747,7 +743,12 @@ return packer.startup({ -- Better list continuation use({ "gaoDean/autolist.nvim", - ft = "markdown", + ft = { + "markdown", + "text", + "text", + "plaintex", + }, config = function() require("autolist").setup({}) end, @@ -799,6 +800,14 @@ return packer.startup({ }, }) end, + cmd = { + "ToggleTerm", + "ToggleTermSetName", + "ToggleTermToggleAll", + "ToggleTermSendCurrentLine", + "ToggleTermSendVisualLines", + "ToggleTermSendVisualSelection", + }, }) -- Take a screenshot of code selected @@ -809,6 +818,10 @@ return packer.startup({ theme = "Coldark-Dark", } end, + cmd = { + "Silicon", + "SiliconHighlight", + }, }) -- Nice sidebar cursor goodies @@ -850,6 +863,13 @@ return packer.startup({ config = function() require("plugins.configs.ccc") end, + cmd = { + "CccPick", + "CccConvert", + "CccHighlighterEnable", + "CccHighlighterToggle", + "CccHighlighterDisable", + }, }) use({