From a3002c71bcdf3cfcb4c5b273b1b336448a3bb643 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sat, 27 Aug 2022 15:12:31 -0700 Subject: [PATCH] nvim: move ts-commentstring plugin, add lazy loading --- .config/nvim/lua/blake/plugins.lua | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.config/nvim/lua/blake/plugins.lua b/.config/nvim/lua/blake/plugins.lua index a333f4c..6002950 100644 --- a/.config/nvim/lua/blake/plugins.lua +++ b/.config/nvim/lua/blake/plugins.lua @@ -144,18 +144,6 @@ return require('packer').startup({function() }) end } - use { -- ts-context-commentstring: set commentstring based on context from treesitter (two langs in one file) - 'JoosepAlviste/nvim-ts-context-commentstring', - requires = { 'nvim-treesitter/nvim-treesitter' }, - config = function() - require'nvim-treesitter.configs'.setup { - context_commentstring = { - enable = true, - enable_autocmd = false, - }, - } - end, - } use { -- cmp: completion menu 'hrsh7th/nvim-cmp', config = function() @@ -384,6 +372,7 @@ return require('packer').startup({function() } use { -- vissort: "Visual Sort" - sort based on selected characters 'navicore/vissort.vim', + cmd = 'Vissort', } use { -- ghost: Web browser integration 'raghur/vim-ghost', @@ -459,6 +448,18 @@ return require('packer').startup({function() } end } + use { -- ts-context-commentstring: set commentstring based on context from treesitter (two langs in one file) + 'JoosepAlviste/nvim-ts-context-commentstring', + requires = { 'nvim-treesitter/nvim-treesitter' }, + config = function() + require'nvim-treesitter.configs'.setup { + context_commentstring = { + enable = true, + enable_autocmd = false, + }, + } + end, + } use { -- filetype.nvim: detect filetype a lot faster than stock neovim 'nathom/filetype.nvim', } @@ -549,6 +550,7 @@ return require('packer').startup({function() } use { -- tpope: fugitive: git integration 'tpope/vim-fugitive', + cmd = 'G', } use { -- tpope: repeat: Repeatability for various tpope plugins 'tpope/vim-repeat', @@ -558,6 +560,7 @@ return require('packer').startup({function() } use { -- tpope: eunuch: some unix shell commands in vim 'tpope/vim-eunuch', + cmd = { 'Remove', 'Unlink', 'Delete', 'Copy', 'Duplicate', 'Move', 'Rename', 'Chmod', 'Mkdir', 'Mkdir', 'Cfind', 'Lfind', 'Clocate', 'Llocate', 'SudoEdit', 'SudoWrite', }, } -- Bootstrap packer if needed { @@ -580,6 +583,9 @@ config = { autoremove = true, -- Limit max jobs to avoid getting killed on low-end hardware max_jobs = Packer_max_jobs, + profile = { + enable = true, + }, }}) -- how to align all plugin descriptions: select all plugins in visual line, :'<,'>Align \(.\+use { -- .\+: \+\)\@<=[^ ][^:]\+$