Skip to content

Commit

Permalink
fix: remove lazy.nvim dep
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 3, 2024
1 parent f98d85a commit 4bd9af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lua/lazydev/pkg.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
local Util = require("lazy.core.util")

---@class lazydev.Pkg
local M = {}

Expand Down Expand Up @@ -32,7 +30,7 @@ function M.pack_unloaded()
if not vim.tbl_contains(sites, default_site) then
sites[#sites + 1] = default_site
end

local Util = require("lazydev.util")
packs = {} ---@type string[]
for _, site in pairs(sites) do
for _, pack in ipairs(vim.fn.expand(site .. "/pack/*/opt/*/lua", false, true)) do
Expand Down
6 changes: 3 additions & 3 deletions lua/lazydev/workspace.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local Config = require("lazydev.config")
local Pkg = require("lazydev.pkg")
local Util = require("lazydev.util")

---@class lazydev.Workspace
Expand Down Expand Up @@ -133,15 +134,14 @@ function M:update()
end

function M:debug()
local Plugin = require("lazy.core.plugin")
local root = M.is_special(self.root) and "[" .. self.root .. "]" or vim.fn.fnamemodify(self.root, ":~")
local lines = { "## " .. root }
---@type string[]
local library = vim.tbl_get(self.settings, "Lua", "workspace", "library") or {}
for _, lib in ipairs(library) do
lib = vim.fn.fnamemodify(lib, ":~")
local plugin = Plugin.find(lib .. "/")
table.insert(lines, "- " .. (plugin and "**" .. plugin.name .. "** " or "") .. ("`" .. lib .. "`"))
local plugin = Pkg.get_plugin_name(lib .. "/")
table.insert(lines, "- " .. (plugin and "**" .. plugin .. "** " or "") .. ("`" .. lib .. "`"))
end
Util.info(lines)
end
Expand Down

0 comments on commit 4bd9af4

Please sign in to comment.