style: sort requires

This commit is contained in:
Folke Lemaitre 2023-10-09 11:25:42 +02:00
parent f0cfbf9952
commit 22bf6ae04b
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
22 changed files with 37 additions and 34 deletions

View File

@ -1,5 +1,5 @@
local Util = require("lazy.core.util")
local Loader = require("lazy.core.loader") local Loader = require("lazy.core.loader")
local Util = require("lazy.core.util")
---@class LazyCmdHandler:LazyHandler ---@class LazyCmdHandler:LazyHandler
local M = {} local M = {}

View File

@ -1,6 +1,6 @@
local Util = require("lazy.core.util")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Loader = require("lazy.core.loader") local Loader = require("lazy.core.loader")
local Util = require("lazy.core.util")
---@class LazyEventOpts ---@class LazyEventOpts
---@field event string ---@field event string

View File

@ -1,5 +1,5 @@
local Util = require("lazy.core.util")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Util = require("lazy.core.util")
---@class LazyHandler ---@class LazyHandler
---@field type LazyHandlerTypes ---@field type LazyHandlerTypes

View File

@ -1,5 +1,5 @@
local Util = require("lazy.core.util")
local Loader = require("lazy.core.loader") local Loader = require("lazy.core.loader")
local Util = require("lazy.core.util")
---@class LazyKeysBase ---@class LazyKeysBase
---@field desc? string ---@field desc? string

View File

@ -1,8 +1,8 @@
local Util = require("lazy.core.util") local Cache = require("lazy.core.cache")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Handler = require("lazy.core.handler") local Handler = require("lazy.core.handler")
local Plugin = require("lazy.core.plugin") local Plugin = require("lazy.core.plugin")
local Cache = require("lazy.core.cache") local Util = require("lazy.core.util")
---@class LazyCoreLoader ---@class LazyCoreLoader
local M = {} local M = {}

View File

@ -1,6 +1,6 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Util = require("lazy.core.util")
local Handler = require("lazy.core.handler") local Handler = require("lazy.core.handler")
local Util = require("lazy.core.util")
---@class LazyCorePlugin ---@class LazyCorePlugin
local M = {} local M = {}

View File

@ -54,7 +54,7 @@ function M.check()
local spec = Config.spec local spec = Config.spec
if spec == nil then if spec == nil then
error("No plugins loaded. Did you forget to run `require(\"lazy\").setup()`?") error('No plugins loaded. Did you forget to run `require("lazy").setup()`?')
else else
for _, plugin in pairs(spec.plugins) do for _, plugin in pairs(spec.plugins) do
M.check_valid(plugin) M.check_valid(plugin)

View File

@ -1,9 +1,9 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Manage = require("lazy.manage")
local Util = require("lazy.util")
local Plugin = require("lazy.core.plugin")
local Git = require("lazy.manage.git") local Git = require("lazy.manage.git")
local Manage = require("lazy.manage")
local Plugin = require("lazy.core.plugin")
local State = require("lazy.state") local State = require("lazy.state")
local Util = require("lazy.util")
local M = {} local M = {}

View File

@ -1,7 +1,7 @@
local Util = require("lazy.util")
local Semver = require("lazy.manage.semver")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Process = require("lazy.manage.process") local Process = require("lazy.manage.process")
local Semver = require("lazy.manage.semver")
local Util = require("lazy.util")
local M = {} local M = {}

View File

@ -1,6 +1,6 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Runner = require("lazy.manage.runner")
local Plugin = require("lazy.core.plugin") local Plugin = require("lazy.core.plugin")
local Runner = require("lazy.manage.runner")
local M = {} local M = {}

View File

@ -1,7 +1,7 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Util = require("lazy.util")
local Plugin = require("lazy.core.plugin")
local Loader = require("lazy.core.loader") local Loader = require("lazy.core.loader")
local Plugin = require("lazy.core.plugin")
local Util = require("lazy.util")
local M = {} local M = {}

View File

@ -1,5 +1,5 @@
local Task = require("lazy.manage.task")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Task = require("lazy.manage.task")
local Util = require("lazy.util") local Util = require("lazy.util")
---@class RunnerOpts ---@class RunnerOpts

View File

@ -1,5 +1,5 @@
local Util = require("lazy.util")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Util = require("lazy.util")
---@type table<string, LazyTaskDef> ---@type table<string, LazyTaskDef>
local M = {} local M = {}

View File

@ -1,6 +1,6 @@
local Config = require("lazy.core.config")
local Git = require("lazy.manage.git") local Git = require("lazy.manage.git")
local Lock = require("lazy.manage.lock") local Lock = require("lazy.manage.lock")
local Config = require("lazy.core.config")
local Util = require("lazy.util") local Util = require("lazy.util")
---@type table<string, LazyTaskDef> ---@type table<string, LazyTaskDef>

View File

@ -1,6 +1,6 @@
local Util = require("lazy.util")
local Loader = require("lazy.core.loader")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Loader = require("lazy.core.loader")
local Util = require("lazy.util")
---@type table<string, LazyTaskDef> ---@type table<string, LazyTaskDef>
local M = {} local M = {}

View File

@ -1,5 +1,5 @@
local Util = require("lazy.util")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Util = require("lazy.util")
---@type LazyState ---@type LazyState
local M = {} local M = {}

View File

@ -1,8 +1,8 @@
local require = require("lazy.core.util").lazy_require local require = require("lazy.core.util").lazy_require
local View = require("lazy.view") local Config = require("lazy.core.config")
local Manage = require("lazy.manage") local Manage = require("lazy.manage")
local Util = require("lazy.util") local Util = require("lazy.util")
local Config = require("lazy.core.config") local View = require("lazy.view")
local ViewConfig = require("lazy.view.config") local ViewConfig = require("lazy.view.config")
local M = {} local M = {}

View File

@ -1,6 +1,6 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local ViewConfig = require("lazy.view.config")
local Util = require("lazy.util") local Util = require("lazy.util")
local ViewConfig = require("lazy.view.config")
---@class LazyFloatOptions ---@class LazyFloatOptions
---@field buf? number ---@field buf? number

View File

@ -1,10 +1,10 @@
local Util = require("lazy.util")
local Render = require("lazy.view.render")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local ViewConfig = require("lazy.view.config")
local Git = require("lazy.manage.git")
local Diff = require("lazy.view.diff") local Diff = require("lazy.view.diff")
local Float = require("lazy.view.float") local Float = require("lazy.view.float")
local Git = require("lazy.manage.git")
local Render = require("lazy.view.render")
local Util = require("lazy.util")
local ViewConfig = require("lazy.view.config")
---@class LazyViewState ---@class LazyViewState
---@field mode string ---@field mode string

View File

@ -1,9 +1,9 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Util = require("lazy.util")
local Sections = require("lazy.view.sections")
local Handler = require("lazy.core.handler")
local Git = require("lazy.manage.git") local Git = require("lazy.manage.git")
local Handler = require("lazy.core.handler")
local Plugin = require("lazy.core.plugin") local Plugin = require("lazy.core.plugin")
local Sections = require("lazy.view.sections")
local Util = require("lazy.util")
local ViewConfig = require("lazy.view.config") local ViewConfig = require("lazy.view.config")
local Text = require("lazy.view.text") local Text = require("lazy.view.text")

View File

@ -1,3 +1,6 @@
indent_type = "Spaces" indent_type = "Spaces"
indent_width = 2 indent_width = 2
column_width = 120 column_width = 120
[sort_requires]
enabled = true

View File

@ -1,6 +1,6 @@
local Util = require("lazy.util")
local Cache = require("lazy.core.cache") local Cache = require("lazy.core.cache")
local Helpers = require("tests.helpers") local Helpers = require("tests.helpers")
local Util = require("lazy.util")
describe("util", function() describe("util", function()
local rtp = vim.opt.rtp:get() local rtp = vim.opt.rtp:get()