mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-09-21 05:05:49 +00:00
feat: support puc lua
This commit is contained in:
parent
6c3bda4aca
commit
b16d225786
4 changed files with 4 additions and 7 deletions
|
@ -23,7 +23,7 @@ M.defaults = {
|
|||
local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec.
|
||||
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update.
|
||||
---@type number? limit the maximum amount of concurrent tasks
|
||||
concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil,
|
||||
concurrency = (vim.fn.has("win32") == 1 or vim.fn.has("win64") == 1) and (vim.uv.available_parallelism() * 2) or nil,
|
||||
git = {
|
||||
-- defaults for the `Lazy log` command
|
||||
-- log = { "--since=3 days ago" }, -- show commits from the last 3 days
|
||||
|
|
|
@ -5,7 +5,7 @@ local M = {}
|
|||
|
||||
---@type LazyProfile[]
|
||||
M._profiles = { { name = "lazy" } }
|
||||
M.is_win = jit.os:find("Windows")
|
||||
M.is_win = vim.fn.has("win32") == 1 or vim.fn.has("win64") == 1
|
||||
|
||||
---@param data (string|{[string]:string})?
|
||||
---@param time number?
|
||||
|
|
|
@ -52,9 +52,6 @@ function M.setup(spec, opts)
|
|||
if vim.fn.has("nvim-0.8.0") ~= 1 then
|
||||
return vim.notify("lazy.nvim requires Neovim >= 0.8.0", vim.log.levels.ERROR, { title = "lazy.nvim" })
|
||||
end
|
||||
if not (pcall(require, "ffi") and jit and jit.version) then
|
||||
return vim.notify("lazy.nvim requires Neovim built with LuaJIT", vim.log.levels.ERROR, { title = "lazy.nvim" })
|
||||
end
|
||||
local start = vim.uv.hrtime()
|
||||
|
||||
-- use the Neovim cache if available
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local ffi = require("ffi")
|
||||
|
||||
local M = {}
|
||||
|
||||
---@class LazyStats
|
||||
|
@ -34,6 +32,7 @@ end
|
|||
function M.cputime()
|
||||
if M.C == nil then
|
||||
pcall(function()
|
||||
local ffi = require("ffi")
|
||||
ffi.cdef([[
|
||||
typedef long time_t;
|
||||
typedef int clockid_t;
|
||||
|
@ -48,6 +47,7 @@ function M.cputime()
|
|||
end
|
||||
|
||||
local function real()
|
||||
local ffi = require("ffi")
|
||||
local pnano = assert(ffi.new("nanotime[?]", 1))
|
||||
local CLOCK_PROCESS_CPUTIME_ID = jit.os == "OSX" and 12 or 2
|
||||
ffi.C.clock_gettime(CLOCK_PROCESS_CPUTIME_ID, pnano)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue