Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Apr 1, 2024
1 parent a2c6612 commit 2e110cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lua/dotvim/bootstrap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ function M.setup()
if Utils.nix.is_nix_managed() then
lazy_opts.dev = {
path = function(plugin)
local name = Core.plugin.guess_name(plugin)
local dev_path = os.getenv("HOME") .. "/Projects/nvim-plugins/" .. name
---@diagnostic disable-next-line: undefined-field
if vim.uv.fs_stat(dev_path) then
return dev_path
end
local pname = Utils.nix.normalize_plugin_pname(plugin)
local resolved_path = Utils.nix.resolve_plugin(pname)
if resolved_path ~= nil then
Expand Down
4 changes: 2 additions & 2 deletions lua/dotvim/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local M = {}

---@param plugin dotvim.core.plugin.PluginOption
---@return string
local function guess_name(plugin)
function M.guess_name(plugin)
-- if has '/', use the second part as name
if plugin.name ~= nil then
return plugin.name
Expand All @@ -28,7 +28,7 @@ end
---@return dotvim.core.plugin.PluginOption
function M.fix_cond(plugin, processed)
local in_vscode = not not vim.g.vscode
local name = guess_name(plugin)
local name = M.guess_name(plugin)
if processed[name] then
return plugin
end
Expand Down

0 comments on commit 2e110cc

Please sign in to comment.