nvim: move ts-commentstring plugin, add lazy loading

This commit is contained in:
PowerUser64 2022-08-27 15:12:31 -07:00
parent 0d77e67c8e
commit a3002c71bc

View file

@ -144,18 +144,6 @@ return require('packer').startup({function()
}) })
end 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 use { -- cmp: completion menu
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
config = function() config = function()
@ -384,6 +372,7 @@ return require('packer').startup({function()
} }
use { -- vissort: "Visual Sort" - sort based on selected characters use { -- vissort: "Visual Sort" - sort based on selected characters
'navicore/vissort.vim', 'navicore/vissort.vim',
cmd = 'Vissort',
} }
use { -- ghost: Web browser integration use { -- ghost: Web browser integration
'raghur/vim-ghost', 'raghur/vim-ghost',
@ -459,6 +448,18 @@ return require('packer').startup({function()
} }
end 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 use { -- filetype.nvim: detect filetype a lot faster than stock neovim
'nathom/filetype.nvim', 'nathom/filetype.nvim',
} }
@ -549,6 +550,7 @@ return require('packer').startup({function()
} }
use { -- tpope: fugitive: git integration use { -- tpope: fugitive: git integration
'tpope/vim-fugitive', 'tpope/vim-fugitive',
cmd = 'G',
} }
use { -- tpope: repeat: Repeatability for various tpope plugins use { -- tpope: repeat: Repeatability for various tpope plugins
'tpope/vim-repeat', 'tpope/vim-repeat',
@ -558,6 +560,7 @@ return require('packer').startup({function()
} }
use { -- tpope: eunuch: some unix shell commands in vim use { -- tpope: eunuch: some unix shell commands in vim
'tpope/vim-eunuch', 'tpope/vim-eunuch',
cmd = { 'Remove', 'Unlink', 'Delete', 'Copy', 'Duplicate', 'Move', 'Rename', 'Chmod', 'Mkdir', 'Mkdir', 'Cfind', 'Lfind', 'Clocate', 'Llocate', 'SudoEdit', 'SudoWrite', },
} }
-- Bootstrap packer if needed { -- Bootstrap packer if needed {
@ -580,6 +583,9 @@ config = {
autoremove = true, autoremove = true,
-- Limit max jobs to avoid getting killed on low-end hardware -- Limit max jobs to avoid getting killed on low-end hardware
max_jobs = Packer_max_jobs, max_jobs = Packer_max_jobs,
profile = {
enable = true,
},
}}) }})
-- how to align all plugin descriptions: select all plugins in visual line, :'<,'>Align \(.\+use { -- .\+: \+\)\@<=[^ ][^:]\+$ -- how to align all plugin descriptions: select all plugins in visual line, :'<,'>Align \(.\+use { -- .\+: \+\)\@<=[^ ][^:]\+$