simplify loading plugins
This commit is contained in:
parent
9982075bcd
commit
40700b5f5f
2
init.lua
2
init.lua
|
@ -20,7 +20,7 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
-- To update plugins, you can run
|
-- To update plugins, you can run
|
||||||
-- :Lazy update
|
-- :Lazy update
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
require 'kickstart.plugins',
|
{ import = 'kickstart.plugins' },
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
return {
|
return {
|
||||||
|
|
||||||
{ -- Linting
|
{ -- Linting
|
||||||
'mfussenegger/nvim-lint',
|
'mfussenegger/nvim-lint',
|
||||||
event = { 'BufReadPre', 'BufNewFile' },
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
@ -1,50 +0,0 @@
|
||||||
return {
|
|
||||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
|
||||||
require 'kickstart.plugins.vim-sleuth',
|
|
||||||
-- NOTE: Plugins can also be added by using a table,
|
|
||||||
-- with the first argument being the link and the following
|
|
||||||
-- keys can be used to configure plugin behavior/loading/etc.
|
|
||||||
--
|
|
||||||
-- Use `opts = {}` to force a plugin to be loaded.
|
|
||||||
--
|
|
||||||
-- This is equivalent to:
|
|
||||||
-- require('Comment').setup({})
|
|
||||||
-- "gc" to comment visual regions/lines
|
|
||||||
require 'kickstart.plugins.comments',
|
|
||||||
-- Here is a more advanced example where we pass configuration
|
|
||||||
-- options to `gitsigns.nvim`. This is equivalent to the following lua:
|
|
||||||
-- require('gitsigns').setup({ ... })
|
|
||||||
--
|
|
||||||
-- See `:help gitsigns` to understand what the configuration keys do
|
|
||||||
require 'kickstart.plugins.gitsigns',
|
|
||||||
-- NOTE: Plugins can also be configured to run lua code when they are loaded.
|
|
||||||
-- This is often very useful to both group configuration, as well as handle
|
|
||||||
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
|
||||||
--
|
|
||||||
-- For example, in the following configuration, we use:
|
|
||||||
-- event = 'VimEnter'
|
|
||||||
--
|
|
||||||
-- which loads which-key before all the UI elements are loaded. Events can be
|
|
||||||
-- normal autocommands events (`:help autocmd-events`).
|
|
||||||
--
|
|
||||||
-- Then, because we use the `config` key, the configuration only runs
|
|
||||||
-- after the plugin has been loaded:
|
|
||||||
-- config = function() ... end
|
|
||||||
require 'kickstart.plugins.which-key',
|
|
||||||
-- NOTE: Plugins can specify dependencies.
|
|
||||||
--
|
|
||||||
-- The dependencies are proper plugin specifications as well - anything
|
|
||||||
-- you do for a plugin at the top level, you can do for a dependency.
|
|
||||||
--
|
|
||||||
-- Use the `dependencies` key to specify the dependencies of a particular plugin
|
|
||||||
require 'kickstart.plugins.telescope',
|
|
||||||
require 'kickstart.plugins.lspconfig',
|
|
||||||
require 'kickstart.plugins.conform',
|
|
||||||
require 'kickstart.plugins.nvim-cmp',
|
|
||||||
require 'kickstart.plugins.colorscheme',
|
|
||||||
require 'kickstart.plugins.todo-comments',
|
|
||||||
require 'kickstart.plugins.mini',
|
|
||||||
require 'kickstart.plugins.nvim-treesitter',
|
|
||||||
require 'kickstart.plugins.lazygit',
|
|
||||||
require 'kickstart.plugins.indent_line',
|
|
||||||
}
|
|
|
@ -1 +1 @@
|
||||||
return 'tpope/vim-sleuth'
|
return { 'tpope/vim-sleuth' }
|
||||||
|
|
Loading…
Reference in New Issue