mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2026-09-11 06:38:37 -07:00
Merge pull request #2151 from TyceHerrman/docs/custom-plugin-load-order
docs: clarify custom plugin load ordering
This commit is contained in:
@@ -976,10 +976,19 @@ do
|
||||
-- require 'kickstart.plugins.neo-tree'
|
||||
-- require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps
|
||||
|
||||
-- NOTE: You can add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- NOTE: You can add your own plugins, configuration, etc. in `lua/custom/plugins/*.lua`.
|
||||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- For independent modules, uncomment the convenience loader:
|
||||
-- require 'custom.plugins'
|
||||
--
|
||||
-- `custom.plugins` automatically loads files from that directory, but their
|
||||
-- order is unspecified. If plugins depend on each other, keep them in the same
|
||||
-- file and put their `vim.pack.add()` and `setup()` calls in the required order.
|
||||
--
|
||||
-- If separate modules need a specific order, require them explicitly instead:
|
||||
-- require 'custom.plugins.colorscheme'
|
||||
-- require 'custom.plugins.ui'
|
||||
-- require 'custom.plugins.git'
|
||||
end
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
|
||||
-- Iterate over all Lua files in the plugins directory and load them
|
||||
-- Iterate over all Lua files in the plugins directory and load them.
|
||||
-- `vim.fs.dir()` iteration order is unspecified and must not be relied upon.
|
||||
local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins')
|
||||
for file_name, type in vim.fs.dir(plugins_dir, { follow = true }) do
|
||||
if (type == 'file' or type == 'link') and file_name:match '%.lua$' and file_name ~= 'init.lua' then
|
||||
|
||||
Reference in New Issue
Block a user